Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 798 Bytes

README.md

File metadata and controls

49 lines (32 loc) · 798 Bytes

NQuery

Simple caching layer for data fetching

Installing NQuery

You can install NQuery with NuGet:

Install-Package NQuery

Or for Redis

Install-Package NQuery.Redis

Or via the .NET Core command line interface:

dotnet add package NQuery

Or for Redis

dotnet add package NQuery

Using NQuery

You can use NQuery as

var query = NQuery.Create(new NQueryConfiguration{
    UseInMemory = true
});

await query.Query( "query-key", await () => QueryYourData() );

Or for Asp.net Core Dependency for Redis as

services.AddNQuery(cfg =>
{
    cfg.UseRedis(opts =>
    {
        opts.Endpoints.Add(new RedisEndpoint() { Host = "localhost", Port = 6379 });
    });
})

Examples

See Test