PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Caching.​Backends.​Redis Namespace / Redis­Caching­Backend Class / Redis­Caching­Backend Methods / Redis­Caching­Backend.​Create­Async Method

RedisCachingBackend.CreateAsync Method

Asynchronously creates a new RedisCachingBackend.

Namespace:  PostSharp.Patterns.Caching.Backends.Redis
Assembly:  PostSharp.Patterns.Caching.Backends.Redis (in PostSharp.Patterns.Caching.Backends.Redis.dll) Version: 6.10.5.0 (6.10.5.0)
Syntax
C#
public static Task<CachingBackend> CreateAsync(
	IConnectionMultiplexer connection,
	RedisCachingBackendConfiguration configuration,
	CancellationToken cancellationToken = null
)

Parameters

connection
Type: IConnectionMultiplexer
A Redis connection.
configuration
Type: PostSharp.Patterns.Caching.Backends.Redis.RedisCachingBackendConfiguration
Configuration of the new back-end.
cancellationToken (Optional)
Type: System.Threading.CancellationToken
A CancellationToken.

Return Value

Type: Task<CachingBackend>
A task returning a RedisCachingBackend, DependenciesRedisCachingBackend, or a TwoLayerCachingBackendEnhancer, according to the properties of the configuration.
See Also