RedisStorage
Definition
Namespace:Telerik.Reporting.Cache.StackExchangeRedis
Assembly:Telerik.Reporting.Cache.StackExchangeRedis.dll
Syntax:
public class RedisStorage : IStorage
Inheritance: objectRedisStorage
Implements:
Constructors
Initializes a new instance of the RedisStorage class.
[Obsolete("This constructor is now obsolete. Instantiate a ConnectionMultiplexer using a ConfigurationOptions with defaultDatabase key set.")]
public RedisStorage(ConnectionMultiplexer connection, string keysPrefix, int databaseNumber)
An object hiding the Redis connection details. Should be reused (static/ shared) for each request.
keysPrefixstringString prefix that should be applied on each key stored in the Redis database. This allows shared usage of one Redis database.
databaseNumberintDetermines the number of the database that should be used.
Initializes a new instance of the RedisStorage class.
public RedisStorage(ConnectionMultiplexer connection, string keysPrefix)
An object hiding the Redis connection details. Should be reused (static/ shared) for each request.
keysPrefixstringString prefix that should be applied on each key stored in the Redis database. This allows shared usage of one Redis database.
Initializes a new instance of the RedisStorage class.
Properties
LockTimeout
int
Gets or sets the acquired lock timeout in seconds. When expired, lock is released. Default timeout is 3 seconds.
public int LockTimeout { get; set; }
Methods
AcquireLock(string)
IDisposable
Acquires a lock on a named resource.
public IDisposable AcquireLock(string key)
IDisposable
Implements:
AcquireReadLock(string)
IDisposable
Acquires a lock on a named resource for reading, using less-restrictive locking mechanism.
public IDisposable AcquireReadLock(string key)
IDisposable
Implements:
Acquires a lock on a named resource and returns a disposable lock object. When the lock object owner disposes it, the lock is released.
Adds a single string value to a set of values denoted from the given key.
public void AddInSet(string key, string value)
Implements:
Deletes a key with its value (string or byte array) from the storage.
public void Delete(string key)
Implements:
Deletes a single string value from a set of values denoted from the given key.
public bool DeleteInSet(string key, string value)
bool
Implements:
Deletes a key with its values from the storage.
public void DeleteSet(string key)
Implements:
Exists(string)
bool
Retrieves a value indicating if a single value (string or byte array) exists in the storage.
public bool Exists(string key)
bool
Implements:
Retrieves a value indicating if a set of values exists in the storage.
public bool ExistsInSet(string key, string value)
bool
Implements:
GetAllMembersInSet(string)
IEnumerable<string>
Retrieves all members in a set of string values.
public IEnumerable<string> GetAllMembersInSet(string key)
IEnumerable<string>
Implements:
GetBytes(string)
byte[]
Retrieves a byte array value stored under particular key.
public byte[] GetBytes(string key)
byte[]
Implements:
Retrieves the count of the values in a set value stored in the storage.
public long GetCountInSet(string key)
long
Implements:
GetString(string)
string
Retrieves a string value stored under particular key.
public string GetString(string key)
string
Implements:
Stores a byte array value under particular key.
public void SetBytes(string key, byte[] value)
Implements:
Stores a string value under particular key.
public void SetString(string key, string value)
Implements: