CacheStorage
Definition
Namespace:Telerik.Reporting.Cache
Assembly:Telerik.Reporting.dll
Syntax:
public class CacheStorage : IStorage
Inheritance: objectCacheStorage
Derived Classes:
Implements:
Constructors
Initializes a new instance of the CacheStorage class.
public CacheStorage(ICache cache)
The target cache instance which will contain the stored values.
Methods
AcquireLock(string)
IDisposable
Acquires a lock on a named resource.
public IDisposable AcquireLock(string key)
The name of the lock.
Returns:IDisposable
A disposable lock object.
Implements:
Implements the AcquireLock(string) interface member.
AcquireReadLock(string)
IDisposable
Acquires a lock on a named resource.
public IDisposable AcquireReadLock(string key)
IDisposable
Implements:
Adds a single string value to a set of values denoted from the given key.
public void AddInSet(string key, string value)
The key that denotes the stored set value.
valuestringThe value that is added to the set.
Implements:
Implements the AddInSet(string, string) interface member.
Deletes a key with its value (string or byte array) from the storage.
public void Delete(string key)
The key that denotes the stored value that should be removed.
Implements:
Implements the Delete(string) interface member.
Deletes a single string value from a set of values denoted from the given key.
public bool DeleteInSet(string key, string value)
The key that denotes the stored set value.
valuestringThe value that should be deleted from the given set.
Returns:bool
True if set with the given key is found and it contained the given value before deleted. Otherwise false.
Implements:
Implements the DeleteInSet(string, string) interface member.
Deletes set of values denoted by the given key.
public void DeleteSet(string key)
The key that denotes the stored set.
Implements:
Implements the DeleteSet(string) interface member.
Exists(string)
bool
Retrieves a value indicating if a single value (string or byte array) exists in the storage.
public bool Exists(string key)
The key that denotes the stored value.
Returns:bool
True if the key with its value exists in the storage, otherwise false.
Implements:
Implements the Exists(string) interface member.
Retrieves a value indicating if a set of values exists in the storage.
public bool ExistsInSet(string key, string value)
The key that denotes the stored set value.
valuestringReturns:bool
True if the key with its value exists in the storage, otherwise false.
Implements:
Implements the ExistsInSet(string, string) interface member.
GetAllMembersInSet(string)
IEnumerable<string>
Retrieves all members in a set of string values.
public IEnumerable<string> GetAllMembersInSet(string key)
The key that denotes the stored set value.
Returns:IEnumerable<string>
An enumerable retrieving each value of the set denoted from the given key.
Implements:
Implements the GetAllMembersInSet(string) interface member.
GetBytes(string)
byte[]
Retrieves a byte array value stored under particular key.
public byte[] GetBytes(string key)
The key that denotes the stored byte array value.
Returns:byte[]
The byte array value stored under the given key. If no such key is found, null (Nothing).
Implements:
Implements the GetBytes(string) interface member.
Retrieves the count of the values in a set value stored in the storage.
public long GetCountInSet(string key)
The key that denotes the stored set value.
Returns:long
The count of the values in the set. If no such set exists, zero.
Implements:
Implements the GetCountInSet(string) interface member.
GetString(string)
string
Retrieves a string value stored under particular key.
public string GetString(string key)
The key that denotes the stored string value.
Returns:string
The string value stored under the given key. If no such key is found, null (Nothing).
Implements:
Implements the GetString(string) interface member.
Stores a byte array value under particular key.
public void SetBytes(string key, byte[] value)
The key that denotes the stored byte array value.
valuebyte[]The value that is stored.
Implements:
Implements the SetBytes(string, byte[]) interface member.
Stores a string value under particular key.
public void SetString(string key, string value)
The key that denotes the stored string value.
valuestringThe value that is stored.
Implements:
Implements the SetString(string, string) interface member.