Open sandboxFocus

Method PerformFullCollectionAsync

PerformFullCollectionAsync(IConnectionMultiplexer, RedisCachingBackendConfiguration?, IServiceProvider?, CancellationToken)

Performs a full garbage collection on all Redis servers of a StackExchange.Redis.IConnectionMultiplexer. This operation enumerates and validates all keys in the database, and can possibly last several minutes and affect performance in production.

Declaration
public static Task PerformFullCollectionAsync(IConnectionMultiplexer connection, RedisCachingBackendConfiguration? configuration = null, IServiceProvider? serviceProvider = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IConnectionMultiplexer connection
RedisCachingBackendConfiguration configuration
IServiceProvider serviceProvider
CancellationToken cancellationToken
Returns
Type Description
Task

PerformFullCollectionAsync(IServer, RedisCachingBackendConfiguration?, IServiceProvider?, CancellationToken)

Performs a full garbage collection on a given Redis server. This operation enumerates and validates all keys in the database, and can possibly last several minutes and affect performance in production.

Declaration
public static Task PerformFullCollectionAsync(IServer server, RedisCachingBackendConfiguration? configuration = null, IServiceProvider? serviceProvider = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IServer server
RedisCachingBackendConfiguration configuration
IServiceProvider serviceProvider
CancellationToken cancellationToken
Returns
Type Description
Task