RedisExplorer.Stack 1.0.0-develop

This is a prerelease version of RedisExplorer.Stack.
dotnet add package RedisExplorer.Stack --version 1.0.0-develop
NuGet\Install-Package RedisExplorer.Stack -Version 1.0.0-develop
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RedisExplorer.Stack" Version="1.0.0-develop" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RedisExplorer.Stack --version 1.0.0-develop
#r "nuget: RedisExplorer.Stack, 1.0.0-develop"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RedisExplorer.Stack as a Cake Addin
#addin nuget:?package=RedisExplorer.Stack&version=1.0.0-develop&prerelease

// Install RedisExplorer.Stack as a Cake Tool
#tool nuget:?package=RedisExplorer.Stack&version=1.0.0-develop&prerelease

RedisExplorer

Build Status

A meta library attempting to offer extended Redis-related features and optimizations to other implementations (such as Microsoft.Extensions.Caching.StackExchangeRedis).

Heavily inspired by / re-uses:

Features

Description

Library was mainly created to optimize operations done by Microsoft.Extensions.Caching.StackExchangeRedis plus connect a few other libraries together.

The main service implements IDistributedCache and registers itself as such with the DI container (and as it's own interface - IRedisExplorer).

Access to the underlying services is provided through appropriate methods on IRedisExplorer - GetDatabase, GetMultiplexer and their async versions - should you need to do something 'unusual'.

The library uses Lua scripts for every operation it performs so if you're using a proxy the library will try to perform an optimized approach to utilizing scripts - every operation will be attempted directly with a SHA1 of the script (EVALSHA) instead of allowing StackExchange.Redis to decide which way to go about the script, if it fails it will be retried with a full script with NoScriptCache flag. This approach utilizes a kind-of non-documented feature of EVAL command (EVAL caches the script on call - performs a silent SCRIPT LOAD), and should result in an eventual consistency (at some point all nodes will have the script cached and no retries will be performed until the script cache is flushed). You can opt-out of this feature by settings UseBandwidthOptimizationForProxies to false on RedisCacheOptions.

Installation

To register the services use the extension method on IServiceCollection (it's similar to the one provided by Microsoft.Extensions.Caching.StackExchangeRedis):

services.AddRedisExplorer(redisSetupAction);

or if you only need the optimized implementation of IDistributedCache then

services.AddRedisExplorerDistributedCache(redisSetupAction);

These will overwrite any other implementation of IDistributedCache currently registered with the container.

If you wish to configure the JsonSerializerOptions used for de/serializing:

services.Configure<JsonSerializerOptions>(RedisExplorer.JsonOptionsName, yourOptions);

Documentation

Documentation available at https://mikym.github.io/RedisExplorer/

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-develop 61 3/19/2024