ClassCacheStorage
Definition
Namespace:Telerik.Reporting.Cache
Assembly:Telerik.Reporting.dll
Syntax:
public class CacheStorage : IStorage
Inheritance: objectCacheStorage
Derived Classes:
Implements:
Constructors
CacheStorage(ICache)
Initializes a new instance of the CacheStorage class.
Declaration
public CacheStorage(ICache cache)
Parameters
cache
The target cache instance which will contain the stored values.
Methods
AcquireLock(string)
Acquires a lock on a named resource.
Declaration
public IDisposable AcquireLock(string key)
Parameters
key
string
The name of the lock.
Returns
IDisposable
A disposable lock object.
Implements
Remarks
Implements the AcquireLock(string) interface member.
AcquireReadLock(string)
Acquires a lock on a named resource.
Declaration
public IDisposable AcquireReadLock(string key)
Parameters
key
string
Returns
IDisposable
Implements
AddInSet(string, string)
Adds a single string value to a set of values denoted from the given key.
Declaration
public void AddInSet(string key, string value)
Parameters
key
string
The key that denotes the stored set value.
value
string
The value that is added to the set.
Implements
Remarks
Implements the AddInSet(string, string) interface member.
Delete(string)
Deletes a key with its value (string or byte array) from the storage.
Declaration
public void Delete(string key)
Parameters
key
string
The key that denotes the stored value that should be removed.
Implements
Remarks
Implements the Delete(string) interface member.
DeleteInSet(string, string)
Deletes a single string value from a set of values denoted from the given key.
Declaration
public bool DeleteInSet(string key, string value)
Parameters
key
string
The key that denotes the stored set value.
value
string
The 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
Remarks
Implements the DeleteInSet(string, string) interface member.
DeleteSet(string)
Deletes set of values denoted by the given key.
Declaration
public void DeleteSet(string key)
Parameters
key
string
The key that denotes the stored set.
Implements
Remarks
Implements the DeleteSet(string) interface member.
Exists(string)
Retrieves a value indicating if a single value (string or byte array) exists in the storage.
Declaration
public bool Exists(string key)
Parameters
key
string
The key that denotes the stored value.
Returns
bool
True if the key with its value exists in the storage, otherwise false.
Implements
Remarks
Implements the Exists(string) interface member.
ExistsInSet(string, string)
Retrieves a value indicating if a set of values exists in the storage.
Declaration
public bool ExistsInSet(string key, string value)
Parameters
key
string
The key that denotes the stored set value.
value
string
Returns
bool
True if the key with its value exists in the storage, otherwise false.
Implements
Remarks
Implements the ExistsInSet(string, string) interface member.
GetAllMembersInSet(string)
Retrieves all members in a set of string values.
Declaration
public IEnumerable<string> GetAllMembersInSet(string key)
Parameters
key
string
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
Remarks
Implements the GetAllMembersInSet(string) interface member.
GetBytes(string)
Retrieves a byte array value stored under particular key.
Declaration
public byte[] GetBytes(string key)
Parameters
key
string
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
Remarks
Implements the GetBytes(string) interface member.
GetCountInSet(string)
Retrieves the count of the values in a set value stored in the storage.
Declaration
public long GetCountInSet(string key)
Parameters
key
string
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
Remarks
Implements the GetCountInSet(string) interface member.
GetString(string)
Retrieves a string value stored under particular key.
Declaration
public string GetString(string key)
Parameters
key
string
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
Remarks
Implements the GetString(string) interface member.
SetBytes(string, byte[])
Stores a byte array value under particular key.
Declaration
public void SetBytes(string key, byte[] value)
Parameters
key
string
The key that denotes the stored byte array value.
value
byte[]
The value that is stored.
Implements
Remarks
Implements the SetBytes(string, byte[]) interface member.
SetString(string, string)
Stores a string value under particular key.
Declaration
public void SetString(string key, string value)
Parameters
key
string
The key that denotes the stored string value.
value
string
The value that is stored.
Implements
Remarks
Implements the SetString(string, string) interface member.