Class CacheSettings
Holds information about which settings that should be used when a IContent instance or an children listing is added to the runtime cache.
Inheritance
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class CacheSettings : Object
Constructors
CacheSettings(TimeSpan)
Initializes a new instance of the CacheSettings class.
Declaration
public CacheSettings(TimeSpan slidingExpiration)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | slidingExpiration | The sliding expiration. |
Properties
AbsoluteExpiration
The time at which the added object expires and is removed from the cache. If you are using sliding expiration, the absoluteExpiration parameter must be "System.Web.Caching.Cache.NoAbsoluteExpiration".
Declaration
public DateTime AbsoluteExpiration { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | The absolute expiration. |
CacheKeys
An list of cache keys that is monitored for changes. When any of these cache keys changes, the cached content instance becomes obsolete and is removed from the cache.
Declaration
public List<string> CacheKeys { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | The cache keys. |
CancelCaching
Gets or sets a value indicating whether the content/listing should be added to cache. If value is true to the content/listing will not be added to cache.
Declaration
public bool CancelCaching { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
MasterKeys
An list of master keys that is monitored for changes. When any of these cache keys changes, the cached content instance becomes obsolete and is removed from the cache.
Declaration
public IList<string> MasterKeys { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> | The cache keys. |
Remarks
Master keys are used as markers to set up common dependencies without having to create the cache entries first. If you set up a master key dependency, there is no need for the corresponding entry to exist before adding something that depends on the master key.
SlidingExpiration
The interval between the time the added object was last accessed and the time at which that object expires. If absolute expiration is used, the slidingExpiration parameter must be "System.Web.Caching.Cache.NoSlidingExpiration".
Declaration
public TimeSpan SlidingExpiration { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan | The sliding expiration. |