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
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 10.10.4Syntax
public class CacheSettings
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 |
|
FileNames
An list of paths (to files or directories) that the cached object is dependent upon. When any of these resources changes, the cached IContent becomes obsolete and is removed from the cache.
Declaration
[Obsolete("No longer supported, use own FileSystemWatcher and invalidate cache items if needed")]
public List<string> FileNames { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | The file names. |
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. |