ClassLocalFileCacheProvider
Provides local file system-based caching for map tiles, implementing the IMapCacheProvider interface to store and retrieve map data from disk.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.RadMap.dll
Syntax:
public class LocalFileCacheProvider : IMapCacheProvider
Inheritance: objectLocalFileCacheProvider
Implements:
Constructors
LocalFileCacheProvider(string)
Initializes a new instance of the LocalFileCacheProvider class with the specified cache directory, creating the directory if it doesn't exist.
Declaration
public LocalFileCacheProvider(string cacheDirectoryPath)
Parameters
cacheDirectoryPath
The file system path where cached map tiles will be stored.
Properties
CacheDirectoryPath
Gets or sets the directory path where cached map tiles are stored, automatically creating the directory if it doesn't exist.
Methods
AsyncFileReadComplete(IAsyncResult)
Handles the completion of asynchronous file read operations, closing resources and invoking the callback with the loaded data.
Declaration
protected virtual void AsyncFileReadComplete(IAsyncResult asyncResult)
Parameters
asyncResult
The IAsyncResult representing the status of the asynchronous operation.
Load(string)
Synchronously loads cached data from the file system using the specified key, checking expiration and returning null if expired or not found.
LoadAsync(string, Action<string, byte[]>)
Asynchronously loads cached data from the file system using the specified key, invoking the callback with the results or null if not found or expired.
Declaration
public void LoadAsync(string key, Action<string, byte[]> callback)
Parameters
key
The cache key identifying the cached item to load.
callback
The callback action to invoke with the key and loaded data when the operation completes.
Implements
Save(string, DateTime, byte[])
Saves data to the cache with the specified key and expiration date, creating or overwriting the file as necessary.
Declaration
public void Save(string key, DateTime expirationDate, byte[] content)
Parameters
key
The cache key identifying the item to save.
expirationDate
The expiration date for the cached item.
content
byte[]
The byte array containing the data to cache.
Implements