PostSharpAPI ReferencePost­Sharp.​Patterns.​Caching.​Backends.​RedisRedis­Cache­Dependency­Garbage­CollectorPerform­Full­Collection­Async
Open sandboxFocus

RedisCacheDependencyGarbageCollector.PerformFullCollectionAsync Method

PerformFullCollectionAsync(RedisCachingBackend, CancellationToken)

Performs a full garbage collection on all Redis servers. 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([Required] RedisCachingBackend backend, CancellationToken cancellationToken = null)
Parameters
Type Name Description
RedisCachingBackend backend

A RedisCachingBackend that supports dependencies.

CancellationToken cancellationToken

A CancellationToken.

Returns
Type Description
System.Threading.Tasks.Task

A System.Threading.Tasks.Task.

PerformFullCollectionAsync(RedisCachingBackend, IServer, 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([Required] RedisCachingBackend backend, [Required] IServer server, CancellationToken cancellationToken = null)
Parameters
Type Name Description
RedisCachingBackend backend

A RedisCachingBackend that supports dependencies.

StackExchange.Redis.IServer server

The Redis server whose keys will be enumerated and validated.

CancellationToken cancellationToken

A CancellationToken.

Returns
Type Description
System.Threading.Tasks.Task

A System.Threading.Tasks.Task.