Class
MemoryCacheProvider

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadMap.dll

Syntax:

cs-api-definition
public class MemoryCacheProvider : IMapCacheProvider

Inheritance: objectMemoryCacheProvider

Implements: IMapCacheProvider

Constructors

MemoryCacheProvider()

Declaration

cs-api-definition
public MemoryCacheProvider()

Fields

cache

Declaration

cs-api-definition
public Dictionary<string, byte[]> cache

Field Value

Dictionary<string, byte[]>

Methods

Load(string)

Retrieves a file from the cache.

Declaration

cs-api-definition
public Stream Load(string key)

Parameters

key

string

The name of the file to retrieve from the cache.

Returns

Stream

Stream or null if the file does not exist.

Implements IMapCacheProvider.Load(string)

LoadAsync(string, Action<string, byte[]>)

Retrieves a file from the cache asynchronously.

Declaration

cs-api-definition
public void LoadAsync(string key, Action<string, byte[]> callback)

Parameters

key

string

The name of the file to retrieve from the cache.

callback

Action<string, byte[]>

Callback which should be called to return the file.

Implements IMapCacheProvider.LoadAsync(string, Action<string, byte[]>)

Save(string, DateTime, byte[])

Stores a file to the cache.

Declaration

cs-api-definition
public void Save(string key, DateTime expirationDate, byte[] content)

Parameters

key

string

The name of the file to store in the cache.

expirationDate

DateTime

The date after which the cache for the file is considered expired.

content

byte[]

The content of the file as byte array.

Implements IMapCacheProvider.Save(string, DateTime, byte[])