Open sandboxFocus

Method CreateAsync

CreateAsync(IConnectionMultiplexer, RedisCachingBackendConfiguration, CancellationToken)

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

Declaration
public static Task<RedisCacheDependencyGarbageCollector> CreateAsync(IConnectionMultiplexer connection, RedisCachingBackendConfiguration configuration, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IConnectionMultiplexer connection

A Redis connection.

RedisCachingBackendConfiguration configuration

A configuration object.

CancellationToken cancellationToken
Returns
Type Description
Task<RedisCacheDependencyGarbageCollector>

A 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(CachingBackend backend, CancellationToken cancellationToken = default)
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 Task returning a RedisCacheDependencyGarbageCollector that uses backend.