ClassFileCacheBase
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
FileCacheBase()
Initializes a new instance of the FileCacheBase class.
Declaration
protected FileCacheBase()
Fields
CachePathProperty
Identifies the CachePath dependency property.
Declaration
public static readonly DependencyProperty CachePathProperty
Field Value
DependencyProperty
MaxExpirationTimeProperty
Identifies the MaxExpiresTime dependency property.
Declaration
public static readonly DependencyProperty MaxExpirationTimeProperty
Field Value
DependencyProperty
MaxSizeProperty
Identifies the MaxSize dependency property.
Declaration
public static readonly DependencyProperty MaxSizeProperty
Field Value
DependencyProperty
MinExpirationTimeProperty
Identifies the MinExpiresTime dependency property.
Declaration
public static readonly DependencyProperty MinExpirationTimeProperty
Field Value
DependencyProperty
Properties
CachePath
Gets or sets the path to files for a storage. This is a dependency property.
MaxExpirationTime
Gets or sets the maximal expiration timespan for a file in cache. This is a dependency property.
Declaration
public TimeSpan MaxExpirationTime { get; set; }
Property Value
MaxSize
Gets or sets the maximal cache size for a storage. Zero value specifies unlimited cache. This is a dependency property.
MinExpirationTime
Gets or sets the minimal expiration timespan for a file in cache. This is a dependency property.
Declaration
public TimeSpan MinExpirationTime { get; set; }
Property Value
Methods
CreateCacheStream(string)
Creates cache stream.
Dispose()
Dispose all resources are used by the FileCacheBase.
Declaration
public void Dispose()
GetFiles(string, string)
Obtains files.
GetFullFilePath(string)
Returns full file path.
Load(string)
Loads the file from the storage.
LoadAsync(string, Action<byte[]>)
Loaded file from a cache to event arguments.
LoadFileMetadata(string)
Loads file metadata.
Declaration
protected abstract MemoryCache.ICacheRecordMetadata LoadFileMetadata(string fileName)
Parameters
fileName
File name.
Returns
MemoryCache.ICacheRecordMetadata
ICacheRecordMetadata implementation instance.
OnCachePathChanged(string, string)
Calls when the cache path is changed.
OnMaxSizeChanged()
Sets thread safety max size value.
Declaration
protected virtual void OnMaxSizeChanged()
OpenCacheStream(string)
Gets cache stream.
RemoveFile(string)
Removes file from cache storage.
Declaration
protected abstract void RemoveFile(string fileName)
Parameters
fileName
File name.
Save(string, DateTime, byte[])
Saves the file to the storage.
SaveFileMetadata(ICacheRecordMetadata)
Saves file metadata.
Declaration
protected abstract void SaveFileMetadata(MemoryCache.ICacheRecordMetadata cacheRecord)
Parameters
cacheRecord
MemoryCache.ICacheRecordMetadata
Cache record metadata.