Try our conversational search powered by Generative AI!

Class CacheSettings

Holds information about which settings that should be used when a PageData object or an children listing is added to the runtime cache.

Inheritance
System.Object
CacheSettings
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
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 page data object 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 page/listing should be added to cache. If value is true to the page/listing will not be added to cache.

Declaration
public bool CancelCaching { get; set; }
Property Value
Type Description
System.Boolean

true if the page/listing should not be added to cache; otherwise, false.

FileNames

An list of paths (to files or directories) that the cached object is dependent upon. When any of these resources changes, the cached PageData becomes obsolete and is removed from the cache.

Declaration
public List<string> FileNames { get; }
Property Value
Type Description
System.Collections.Generic.List<System.String>

The file names.

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.

Extension Methods