Class CacheItemPolicy
- Namespace
- Dynamicweb.Caching
- Assembly
- Dynamicweb.Core.dll
The CacheItemPolicy class contains configuration elements for determining how cache entries are managed.
public class CacheItemPolicy
- Inheritance
-
CacheItemPolicy
- Inherited Members
Fields
DefaultStoragePolicy
Value indicating the default storage policy for caching. This value is uses the same configuration as the removed StorageManager.
public static readonly CacheItemPolicy DefaultStoragePolicy
Field Value
InfiniteAbsoluteExpiration
Value indicating that the cache entry has not expiration date.
public static readonly DateTimeOffset InfiniteAbsoluteExpiration
Field Value
NoSlidingExpiration
Value indicating the the cache entry has no sliding expiration.
public static readonly TimeSpan NoSlidingExpiration
Field Value
Properties
AbsoluteExpiration
Gets or sets a date time value indicating when the cache entry for this CacheItemPolicy expires. Default value is InfiniteAbsoluteExpiration.
public DateTimeOffset AbsoluteExpiration { get; set; }
Property Value
CacheKeyDependencies
Gets or sets a list of cache keys to monitor. Changes in cache entries with these keys causes the cache entry for this CacheItemPolicy to be expired.
public IEnumerable<string> CacheKeyDependencies { get; set; }
Property Value
FileDependencies
Gets or sets a list of directory paths or file paths to monitor. Changes detected in these paths causes the cache entry for this CacheItemPolicy to be expired.
public IEnumerable<string> FileDependencies { get; set; }
Property Value
IncludeSubdirectories
Determines if the file dependecies should include subdirectories for the watch related to when the cache is invalidated.
public bool IncludeSubdirectories { get; set; }
Property Value
RemovedCallback
Gets or sets the removed callback.
public CacheItemPolicy.CacheItemRemovedCallback? RemovedCallback { get; set; }
Property Value
- CacheItemPolicy.CacheItemRemovedCallback
The removed callback.
SlidingExpiration
Gets or sets a time span indicating how long a cache entry takes to go stale. This value represents the time between hits. Default value is NoSlidingExpiration.
public TimeSpan SlidingExpiration { get; set; }