RedisCachingBackend.CreateAsync Method |
Asynchronously creates a new RedisCachingBackend.
Namespace: PostSharp.Patterns.Caching.Backends.Redis
Assembly: PostSharp.Patterns.Caching.Backends.Redis (in PostSharp.Patterns.Caching.Backends.Redis.dll) Version: 6.9.11.0 (6.9.11.0)
C#
public static Task<CachingBackend> CreateAsync( IConnectionMultiplexer connection, RedisCachingBackendConfiguration configuration, CancellationToken cancellationToken = null )
Parameters
- connection
- Type: IConnectionMultiplexer
A Redis connection. - configuration
- Type: PostSharp.Patterns.Caching.Backends.Redis.RedisCachingBackendConfiguration
Configuration of the new back-end. - cancellationToken (Optional)
- Type: System.Threading.CancellationToken
A CancellationToken.
Return Value
Type: Task<CachingBackend>A task returning a RedisCachingBackend, DependenciesRedisCachingBackend, or a TwoLayerCachingBackendEnhancer, according to the properties of the configuration.