Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.4.7
|
Leadtools.Caching Assembly > Leadtools.Caching Namespace : CacheItemPolicy Class |
public class CacheItemPolicy
'Declaration
Public Class CacheItemPolicy
'Usage
Dim instance As CacheItemPolicy
public class CacheItemPolicy
public ref class CacheItemPolicy
The CacheItemPolicy instance contains the expiration details of a cache entry. When the cache object retrieves a cache entry, the policy is checked and if the expiration details is met, the entry is deleted from the cache.
The default constructor of CacheItemPolicy creates a policy that does not expire (maximum value).
CacheItemPolicy supports two types of expiration:
Absolute: The entry will expire at a specific time. To use this set AbsoluteExpiration to the desired date and time and leave SlidingExpiration to the default value of ObjectCache.NoSlidingExpiration.
Sliding: The entry will expire if it has not been accessed after for a specific time. To use this set SlidingExpiration to the desired time span value and leave AbsoluteExpiration to the default value of ObjectCache.InfiniteAbsoluteExpiration.