New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadMap.dll

Syntax:

C#
public class MemoryCacheProvider : IMapCacheProvider

Inheritance: objectMemoryCacheProvider

Implements: IMapCacheProvider

Constructors

C#
public MemoryCacheProvider()

Fields

cache

Dictionary<string, byte[]>

C#
public Dictionary<string, byte[]> cache

Methods

Retrieves a file from the cache.

C#
public Stream Load(string key)
Parameters:keystring

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)

Retrieves a file from the cache asynchronously.

C#
public void LoadAsync(string key, Action<string, byte[]> callback)
Parameters:keystring

The name of the file to retrieve from the cache.

callbackAction<string, byte[]>

Callback which should be called to return the file.

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

Stores a file to the cache.

C#
public void Save(string key, DateTime expirationDate, byte[] content)
Parameters:keystring

The name of the file to store in the cache.

expirationDateDateTime

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

contentbyte[]

The content of the file as byte array.

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