New to Telerik ReportingStart a free 30-day trial

Definition

Namespace:Telerik.Reporting.Cache

Assembly:Telerik.Reporting.dll

Syntax:

C#
public class CacheStorage : IStorage

Inheritance: objectCacheStorage

Derived Classes: DatabaseStorageFileStorage

Implements: IStorage

Constructors

Initializes a new instance of the CacheStorage class.

C#
public CacheStorage(ICache cache)
Parameters:cacheICache

The target cache instance which will contain the stored values.

Methods

Acquires a lock on a named resource.

C#
public IDisposable AcquireLock(string key)
Parameters:keystring

The name of the lock.

Returns:

IDisposable

A disposable lock object.

Implements: IStorage.AcquireLock(string)

Remarks:

Implements the AcquireLock(string) interface member.

Acquires a lock on a named resource.

C#
public IDisposable AcquireReadLock(string key)
Parameters:keystringReturns:

IDisposable

Implements: IStorage.AcquireReadLock(string)

Adds a single string value to a set of values denoted from the given key.

C#
public void AddInSet(string key, string value)
Parameters:keystring

The key that denotes the stored set value.

valuestring

The value that is added to the set.

Implements: IStorage.AddInSet(string, string)

Remarks:

Implements the AddInSet(string, string) interface member.

Deletes a key with its value (string or byte array) from the storage.

C#
public void Delete(string key)
Parameters:keystring

The key that denotes the stored value that should be removed.

Implements: IStorage.Delete(string)

Remarks:

Implements the Delete(string) interface member.

Deletes a single string value from a set of values denoted from the given key.

C#
public bool DeleteInSet(string key, string value)
Parameters:keystring

The key that denotes the stored set value.

valuestring

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: IStorage.DeleteInSet(string, string)

Remarks:

Implements the DeleteInSet(string, string) interface member.

Deletes set of values denoted by the given key.

C#
public void DeleteSet(string key)
Parameters:keystring

The key that denotes the stored set.

Implements: IStorage.DeleteSet(string)

Remarks:

Implements the DeleteSet(string) interface member.

Retrieves a value indicating if a single value (string or byte array) exists in the storage.

C#
public bool Exists(string key)
Parameters:keystring

The key that denotes the stored value.

Returns:

bool

True if the key with its value exists in the storage, otherwise false.

Implements: IStorage.Exists(string)

Remarks:

Implements the Exists(string) interface member.

Retrieves a value indicating if a set of values exists in the storage.

C#
public bool ExistsInSet(string key, string value)
Parameters:keystring

The key that denotes the stored set value.

valuestring
Returns:

bool

True if the key with its value exists in the storage, otherwise false.

Implements: IStorage.ExistsInSet(string, string)

Remarks:

Implements the ExistsInSet(string, string) interface member.

GetAllMembersInSet(string)

IEnumerable<string>

Retrieves all members in a set of string values.

C#
public IEnumerable<string> GetAllMembersInSet(string key)
Parameters:keystring

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: IStorage.GetAllMembersInSet(string)

Remarks:

Implements the GetAllMembersInSet(string) interface member.

Retrieves a byte array value stored under particular key.

C#
public byte[] GetBytes(string key)
Parameters:keystring

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: IStorage.GetBytes(string)

Remarks:

Implements the GetBytes(string) interface member.

Retrieves the count of the values in a set value stored in the storage.

C#
public long GetCountInSet(string key)
Parameters:keystring

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: IStorage.GetCountInSet(string)

Remarks:

Implements the GetCountInSet(string) interface member.

Retrieves a string value stored under particular key.

C#
public string GetString(string key)
Parameters:keystring

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: IStorage.GetString(string)

Remarks:

Implements the GetString(string) interface member.

Stores a byte array value under particular key.

C#
public void SetBytes(string key, byte[] value)
Parameters:keystring

The key that denotes the stored byte array value.

valuebyte[]

The value that is stored.

Implements: IStorage.SetBytes(string, byte[])

Remarks:

Implements the SetBytes(string, byte[]) interface member.

Stores a string value under particular key.

C#
public void SetString(string key, string value)
Parameters:keystring

The key that denotes the stored string value.

valuestring

The value that is stored.

Implements: IStorage.SetString(string, string)

Remarks:

Implements the SetString(string, string) interface member.