MetalamaAPI documentationPatterns APIMetalama.​Patterns.​Caching.​Backends.​RedisRedis­Garbage­Collection­UtilitiesPerform­Full­Collection­Async
Open sandboxFocus

RedisGarbageCollectionUtilities.PerformFullCollectionAsync Method

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 = null)
Parameters
Type Name Description
StackExchange.Redis.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 = null)
Parameters
Type Name Description
StackExchange.Redis.IServer server
RedisCachingBackendConfiguration configuration
IServiceProvider serviceProvider
CancellationToken cancellationToken
Returns
Type Description
Task