Open sandboxFocus

Class RedisCachingFactory

Extensions methods for CachingBackendBuilder and IServiceCollection that builds components of the Metalama.Patterns.Caching.Backends.Redis namespace.

Inheritance
RedisCachingFactory
Namespace: Metalama.Patterns.Caching.Backends.Redis
Assembly: Metalama.Patterns.Caching.Backends.Redis.dll
Syntax
public static class RedisCachingFactory

Methods

Name Description
AddRedisCacheDependencyGarbageCollector(IServiceCollection, RedisCachingBackendConfiguration)

Adds a service (implementing IHostedService) that removes dependencies added when a RedisCachingBackend when items are expired or evicted from the cache.

AddRedisCacheDependencyGarbageCollector(IServiceCollection, Func<IServiceProvider, RedisCachingBackendConfiguration>)
CreateRedisCacheDependencyGarbageCollector(RedisCachingBackendConfiguration, IServiceProvider?)

Creates an instance of the garbage collector service described in AddRedisCacheDependencyGarbageCollector(IServiceCollection, RedisCachingBackendConfiguration). So start the instance, use StartAsync(CancellationToken).

Redis(CachingBackendBuilder, RedisCachingBackendConfiguration?)

Builds a CachingBackend based on a Redis server given an existing StackExchange.Redis.IConnectionMultiplexer.

WithRedisSynchronization(MemoryCachingBackendBuilder, RedisCacheSynchronizerConfiguration?)

Enhances an in-memory cache with a component that synchronizes several local, in-memory caches, using Redis Pub/Sub, given an StackExchange.Redis.IConnectionMultiplexer.