PostSharp 5.0 / / 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 (Caching­Backend, Cancellation­Token)

RedisCacheDependencyGarbageCollector.CreateAsync Method (CachingBackend, CancellationToken)

Asynchronously creates a new RedisCacheDependencyGarbageCollector that uses an existing RedisCachingBackend object.

Namespace:  PostSharp.Patterns.Caching.Backends.Redis
Assembly:  PostSharp.Patterns.Caching.Backends.Redis (in PostSharp.Patterns.Caching.Backends.Redis.dll) Version: 5.0.55.0 (5.0.55.0)
Syntax
C#
public static Task<RedisCacheDependencyGarbageCollector> CreateAsync(
	CachingBackend backend,
	CancellationToken cancellationToken = null
)

Parameters

backend
Type: PostSharp.Patterns.Caching.Implementation.CachingBackend
An existing CachingBackend, as returned by Create(IConnectionMultiplexer, RedisCachingBackendConfiguration), that supports dependencies.
cancellationToken (Optional)
Type: System.Threading.CancellationToken

Return Value

Type: Task<RedisCacheDependencyGarbageCollector>
A Task returning a RedisCacheDependencyGarbageCollector that uses backend.
See Also