FileCacheBase
The base file cache class.
Definition
Namespace:Telerik.Windows.Controls.Map
Assembly:Telerik.Windows.Controls.DataVisualization.dll
Syntax:
public abstract class FileCacheBase : MemoryCache, ICacheStorage
Inheritance: objectMemoryCacheFileCacheBase
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the FileCacheBase class.
protected FileCacheBase()
Fields
CachePathProperty
DependencyProperty
Identifies the CachePath dependency property.
public static readonly DependencyProperty CachePathProperty
MaxExpirationTimeProperty
DependencyProperty
Identifies the MaxExpiresTime dependency property.
public static readonly DependencyProperty MaxExpirationTimeProperty
MaxSizeProperty
DependencyProperty
Identifies the MaxSize dependency property.
public static readonly DependencyProperty MaxSizeProperty
MinExpirationTimeProperty
DependencyProperty
Identifies the MinExpiresTime dependency property.
public static readonly DependencyProperty MinExpirationTimeProperty
Properties
Gets or sets the path to files for a storage. This is a dependency property.
public string CachePath { get; set; }
Gets or sets the maximal expiration timespan for a file in cache. This is a dependency property.
public TimeSpan MaxExpirationTime { get; set; }
Gets or sets the maximal cache size for a storage. Zero value specifies unlimited cache. This is a dependency property.
public long MaxSize { get; set; }
Gets or sets the minimal expiration timespan for a file in cache. This is a dependency property.
public TimeSpan MinExpirationTime { get; set; }
Methods
Dispose all resources are used by the FileCacheBase.
public void Dispose()
Loads file metadata.
protected abstract MemoryCache.ICacheRecordMetadata LoadFileMetadata(string fileName)
File name.
Returns:MemoryCache.ICacheRecordMetadata
ICacheRecordMetadata implementation instance.
Sets thread safety max size value.
protected virtual void OnMaxSizeChanged()
Removes file from cache storage.
Saves file metadata.
protected abstract void SaveFileMetadata(MemoryCache.ICacheRecordMetadata cacheRecord)
Cache record metadata.