🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

redisexplorer.stack

Package Overview
Dependencies
Maintainers
0
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

redisexplorer.stack

1.0.0-develop
NuGet
Version published
Maintainers
0
Created
Source

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/

Keywords

FAQs

Package last updated on 19 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts