NRedisStack extensions guide

Access Redis Open Source modules

NRedisStack is a library that builds upon StackExchange.Redis and provides an API for the extended set of Redis data types and features, such as JSON, Redis search, probabilistic data types, and Time series. The sections below explain how to install NRedisStack. Note that this also installs StackExchange.Redis as a dependency, so you don't need to install it as a separate step.

NRedisStack requires a running Redis server. For production apps, provision a hosted Redis resource such as Redis Cloud or Azure Managed Redis. For local development and testing, you can also run Redis Open Source locally. See Install Redis Open Source for installation instructions.

Note:
You can also access Redis with an object-mapping client interface. See Redis OM for .NET for more information.

Install

Using the dotnet CLI, run:

dotnet add package NRedisStack

Redis Open Source modules

To access Redis Open Source capabilities, use the appropriate interface like this:

IBloomCommands bf = db.BF();    // Bloom filter commands
ICuckooCommands cf = db.CF();  // Cuckoo filter commands
ICmsCommands cms = db.CMS();   // Count-min sketch commands
ITopKCommands topk = db.TOPK(); // Top-K commands
ITdigestCommands tdigest = db.TDIGEST(); // T-digest commands
ISearchCommands ft = db.FT();  // Redis search commands
IJsonCommands json = db.JSON(); // JSON commands
ITimeSeriesCommands ts = db.TS(); // Time series commands

More information

See the other pages in this section for more information and examples.

RATE THIS PAGE
Back to top ↑