PostSharpAPI ReferencePost­Sharp.​Patterns.​Caching.​Backends.​RedisRedis­Caching­Backend
Open sandboxFocus

RedisCachingBackend Class

A CachingBackend for Redis, based on the StackExchange.Redis client.

Inheritance
System.Object
RedisCachingBackend
Implements
IDisposable
Namespace: PostSharp.Patterns.Caching.Backends.Redis
Assembly: PostSharp.Patterns.Caching.Backends.Redis.dll
Syntax
public class RedisCachingBackend : CachingBackend

Properties

Name Description
Configuration

Gets the configuration of the current RedisCachingBackend.

Connection

Gets the Redis connection used by the current RedisCachingBackend.

Database

Gets the Redis database used by the current RedisCachingBackend.

Methods

Name Description
ClearAsyncCore(CancellationToken)

Asynchronously clears the cache. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked.

ClearCore()

Clears the cache. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked.

ContainsDependencyCore(String)

Determines whether the cache contains a given dependency. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

ContainsItemAsyncCore(String, CancellationToken)

Asynchronously determines whether the cache contains an item of a given key. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

ContainsItemCore(String)

Determines whether the cache contains an item of a given key. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

Create(IConnectionMultiplexer, RedisCachingBackendConfiguration)

Creates a new RedisCachingBackend.

CreateAsync(IConnectionMultiplexer, RedisCachingBackendConfiguration, CancellationToken)

Asynchronously creates a new RedisCachingBackend.

CreateFeatures()

Creates a CachingBackendFeatures object, which describes set of features implemented by the back-end. This method is invoked the first time the SupportedFeatures property is evaluated. The result is then cached.

DeleteItem(String)
DeleteItemAsync(String)
DisposeAsyncCore(CancellationToken)

Asynchronously disposes the current CachingBackend. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked.

DisposeCore(Boolean)

Synchronously disposes the current CachingBackend. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked.

Finalize()

Destructor.

GetCacheValue(RedisKey, RedisValue)
GetItemAsyncCore(String, Boolean, CancellationToken)
GetItemCore(String, Boolean)
InvalidateDependencyCore(String)

Removes from the cache all items that have a specific dependency. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

ProcessEvent(String, String, Guid)

Processes an event that was received on the events channel.

RemoveItemAsyncCore(String, CancellationToken)

Asynchronously removes a cache item from the cache given its key. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

RemoveItemCore(String)

Removes a cache item from the cache given its key. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

SendEvent(String, String)

Sends of event.

SendEventAsync(String, String)

Asynchronously sends of event.

SetItemAsyncCore(String, CacheItem, CancellationToken)

Asynchronously sets a cache item. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API. The default implementation is to call the synchronous SetItemCore(String, CacheItem) method.

SetItemCore(String, CacheItem)

Sets a cache item. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

WhenBackgroundTasksCompleted(CancellationToken)

Returns a System.Threading.Tasks.Task that is signaled to the complete state when all background tasks have completed.