Open sandboxFocus

Class RedisCachingBackend

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

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

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.

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(bool)

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.

~RedisCachingBackend()

Destructor.

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 Task that is signaled to the complete state when all background tasks have completed.