PostSharp.ILAPI ReferencePost­Sharp.​Patterns.​Caching.​Backends.​RedisRedis­Cache­Dependency­Garbage­CollectorCreate­Async
Open sandboxFocus

RedisCacheDependencyGarbageCollector.CreateAsync Method

CreateAsync(IConnectionMultiplexer, RedisCachingBackendConfiguration, CancellationToken)

Asynchronously creates a new RedisCacheDependencyGarbageCollector given a Redis connection and a configuration object.

Declaration
public static Task<RedisCacheDependencyGarbageCollector> CreateAsync([Required] IConnectionMultiplexer connection, RedisCachingBackendConfiguration configuration, CancellationToken cancellationToken = null)
Parameters
Type Name Description
StackExchange.Redis.IConnectionMultiplexer connection

A Redis connection.

RedisCachingBackendConfiguration configuration

A configuration object.

CancellationToken cancellationToken
Returns
Type Description
Task<RedisCacheDependencyGarbageCollector>

A System.Threading.Tasks.Task returning a RedisCacheDependencyGarbageCollector that uses connection and configuration.

CreateAsync(CachingBackend, CancellationToken)

Asynchronously creates a new RedisCacheDependencyGarbageCollector that uses an existing RedisCachingBackend object.

Declaration
public static Task<RedisCacheDependencyGarbageCollector> CreateAsync([Required] CachingBackend backend, CancellationToken cancellationToken = null)
Parameters
Type Name Description
CachingBackend backend

An existing CachingBackend, as returned by Create(IConnectionMultiplexer, RedisCachingBackendConfiguration), that supports dependencies.

CancellationToken cancellationToken
Returns
Type Description
Task<RedisCacheDependencyGarbageCollector>

A System.Threading.Tasks.Task returning a RedisCacheDependencyGarbageCollector that uses backend.