Interface ICacheable
Dictates how an item in the cache should identify itself. If implemented by a collection, the items within it must also implement this interface.
Namespace: EPiServer.Data.Cache
Assembly: EPiServer.Data.dll
Version: 11.20.7Syntax
public interface ICacheable
Properties
CacheKey
Returns the cache key under which the current object should be stored.
Declaration
string[] CacheKey { get; }
Property Value
Type | Description |
---|---|
System.String[] |
Remarks
Implementing the ICacheable interface enables the cache subsystem implemented by CacheHandler to automatically store an object under its intended cache key without specifying it explicitly at the time of the store.
When implemented by a collection and the elements contained in the collection, it allows the cache system to automatically track dependencies from the contained items to the collection. This way, the collection gets invalidated when an item within the collection is invalidated.