Class MemoryCache
A generic map cache storage.
Inheritance
Namespace: Telerik.Windows.Controls.Map
Assembly: Telerik.Windows.Controls.DataVisualization.dll
Syntax
public class MemoryCache : DependencyObject, ICacheStorage
Constructors
MemoryCache()
Initializes a new instance of the MemoryCache class.
Declaration
public MemoryCache()
Fields
MemoryMaxSizeProperty
Identifies the MemoryMaxSize dependency property.
Declaration
public static readonly DependencyProperty MemoryMaxSizeProperty
Field Value
System.
|
Properties
MemoryMaxSize
Gets or sets the maximal memory cache size for a storage. This is a dependency property.
Declaration
public long MemoryMaxSize { get; set; }
Property Value
System.
|
Methods
AddToCacheRecords(MemoryCache.CacheRecord)
Adds cache record to the memory cache container.
Declaration
protected void AddToCacheRecords(MemoryCache.CacheRecord cacheRecord)
Parameters
Memory Cache record instance. |
GetCacheRecord(String)
Gets the CacheRecord.
Declaration
protected MemoryCache.CacheRecord GetCacheRecord(string fileName)
Parameters
System. File name. |
Returns
Memory CacheRecord. |
GetTile(String)
Reads tile.
Declaration
protected byte[] GetTile(string fileName)
Parameters
System. File name. |
Returns
System. Byte array of tile image. |
Load(String)
Loads the file from the memory cache.
Declaration
public virtual Stream Load(string fileName)
Parameters
System. File name. |
Returns
System. Stream if the file exists and does not expired or null. |
Implements
LoadAsync(String, Action<Byte[]>)
Loaded file from a cache.
Declaration
public virtual void LoadAsync(string fileName, Action<byte[]> callback)
Parameters
System. File name. |
System. TileAvailable event arguments. |
Implements
Save(String, DateTime, Byte[])
Saves the file to the memory.
Declaration
public virtual void Save(string fileName, DateTime expirationDate, byte[] tile)
Parameters
System. File name. |
System. Expiration date. |
System. Byte array which is saved to the file. |