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.​Create­Async Method / Redis­Cache­Dependency­Garbage­Collector.​Create­Async Method (IConnection­Multiplexer, Redis­Caching­Backend­Configuration, Cancellation­Token)

RedisCacheDependencyGarbageCollector.CreateAsync Method (IConnectionMultiplexer, RedisCachingBackendConfiguration, CancellationToken)

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

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<RedisCacheDependencyGarbageCollector> CreateAsync(
	IConnectionMultiplexer connection,
	RedisCachingBackendConfiguration configuration,
	CancellationToken cancellationToken = null
)

Parameters

connection
Type: IConnectionMultiplexer
A Redis connection.
configuration
Type: PostSharp.Patterns.Caching.Backends.Redis.RedisCachingBackendConfiguration
A configuration object.
cancellationToken (Optional)
Type: System.Threading.CancellationToken

Return Value

Type: Task<RedisCacheDependencyGarbageCollector>
A Task returning a RedisCacheDependencyGarbageCollector that uses connection and configuration.
See Also