PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Caching.​Backends.​Redis Namespace / Redis­Cache­Dependency­Garbage­Collector Class / Redis­Cache­Dependency­Garbage­Collector Methods / Redis­Cache­Dependency­Garbage­Collector.​Perform­Full­Collection­Async Method / Redis­Cache­Dependency­Garbage­Collector.​Perform­Full­Collection­Async Method (Redis­Caching­Backend, IServer, Cancellation­Token)

RedisCacheDependencyGarbageCollector.PerformFullCollectionAsync Method (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.

Namespace:  PostSharp.Patterns.Caching.Backends.Redis
Assembly:  PostSharp.Patterns.Caching.Backends.Redis (in PostSharp.Patterns.Caching.Backends.Redis.dll) Version: 6.9.11.0 (6.9.11.0)
Syntax
C#
public static Task PerformFullCollectionAsync(
	RedisCachingBackend backend,
	IServer server,
	CancellationToken cancellationToken = null
)

Parameters

backend
Type: PostSharp.Patterns.Caching.Backends.Redis.RedisCachingBackend
A RedisCachingBackend that supports dependencies.
server
Type: IServer
The Redis server whose keys will be enumerated and validated.
cancellationToken (Optional)
Type: System.Threading.CancellationToken
A CancellationToken.

Return Value

Type: Task
A Task.
See Also