VitreousRedisCachingServiceCollectionExtensions class
Namespace: Vitreous.Caching.Redis
Assembly: Vitreous.Caching.Redis.dll
Extension methods to register the Vitreous Redis caching backend.
public static class VitreousRedisCachingServiceCollectionExtensionsInheritance
Section titled “Inheritance”object ← VitreousRedisCachingServiceCollectionExtensions
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Section titled “Methods”AddVitreousRedisCaching(IServiceCollection, Action<VitreousRedisCachingOptions>?)
Section titled “ AddVitreousRedisCaching(IServiceCollection, Action<VitreousRedisCachingOptions>?)”Registers Vitreous caching behaviors backed by Redis, with full support for tag-based cache invalidation via InvalidatesTags.
public static IServiceCollection AddVitreousRedisCaching(this IServiceCollection services, Action<VitreousRedisCachingOptions>? configure = null)Parameters
Section titled “Parameters”services IServiceCollection
The service collection.
configure Action<VitreousRedisCachingOptions>?
Configure Redis connection and key/tag prefixes.
Returns
Section titled “Returns”Remarks
Section titled “Remarks”This registers RedisVitreousCache as the IVitreousCache
implementation. When ConnectionString is set,
an IConnectionMultiplexer is registered from it (unless one is already
registered). Otherwise register your own IConnectionMultiplexer, before or
after calling this method.
The multiplexer is only resolved the first time a cacheable query or invalidating command runs, so other messages never wait on, or fail because of, Redis.