PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Caching.​Backends.​Redis Namespace / Redis­Caching­Backend­Configuration Class / Redis­Caching­Backend­Configuration Properties

RedisCachingBackendConfiguration Properties

The RedisCachingBackendConfiguration type exposes the following members.

Public propertyConnectionTimeout
Gets or sets the time that the Redis backend will wait for a Redis connection. (When you create a new Redis backend, if it doesn't connect to a Redis server in this timeout, a TimeoutException is thrown.)
Public propertyCreateSerializer
Gets or sets a function that creates the serializer used to serialize objects into byte arrays (and conversely). The default value is null, which means that BinarySerializer will be used.
Public propertyDatabase
Gets the index of the database to use. The default value is -1 (automatic selection).
Public propertyDefaultExpiration
Gets or sets the default expiration time of cached items. All items that don't have an explicit expiration time are automatically expired according to the value of this property, unless they have the NotRemovable priority. The default value is 1 day.
Public propertyIsFrozen
Determines whether the current instance is frozen (i.e. read-only).
Public propertyIsLocallyCached
Determines whether a MemoryCachingBackend should be added in front of the RedisCachingBackend.
Public propertyKeyPrefix
Gets the prefix for the key of all Redis items created by the RedisCachingBackend. The default value is cache.
Public propertyOwnsConnection
Determines whether the RedisCachingBackend should dispose the Redis connection when the RedisCachingBackend itself is disposed.
Public propertySupportsDependencies
Determines whether the RedisCachingBackend should support dependencies. When this property is used, the DependenciesRedisCachingBackend class is used instead of RedisCachingBackend. When dependencies are enabled, at least one instance of the RedisCacheDependencyGarbageCollector MUST run.
Public propertyTransactionMaxRetries
Gets or sets the number of times Redis transactions are retried when they fail due to a data conflict, before an exception is raised. The default value is 5.
See Also