Try our conversational search powered by Generative AI!

Class ContentInstanceCache

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Supporting API to content provider that deals with reading and inserting IContent into cache

Inheritance
System.Object
ContentInstanceCache
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.Internal
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(ServiceType = typeof(IContentInstanceCache), IncludeServiceAccessor = false)]
public class ContentInstanceCache : IContentInstanceCache

Constructors

ContentInstanceCache(ISynchronizedObjectInstanceCache, IContentCacheKeyCreator, ContentOptions)

Declaration
public ContentInstanceCache(ISynchronizedObjectInstanceCache cache, IContentCacheKeyCreator cacheKeyCreator, ContentOptions options)
Parameters
Type Name Description
ISynchronizedObjectInstanceCache cache
IContentCacheKeyCreator cacheKeyCreator
ContentOptions options

Properties

CacheEnabled

Declaration
public Func<bool> CacheEnabled { get; set; }
Property Value
Type Description
System.Func<System.Boolean>

ContextSlidingExpiration

Declaration
public Func<TimeSpan?> ContextSlidingExpiration { get; set; }
Property Value
Type Description
System.Func<System.Nullable<System.TimeSpan>>

Methods

CreateCacheSettings(ContentReference)

Declaration
public CacheSettings CreateCacheSettings(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink
Returns
Type Description
CacheSettings

Insert(IContent, String, CacheEvictionPolicy)

Declaration
public virtual void Insert(IContent content, string language, CacheEvictionPolicy evictionPolicy)
Parameters
Type Name Description
IContent content
System.String language
CacheEvictionPolicy evictionPolicy

ReadThrough(ContentReference, String, Func<IContent>)

Declaration
public virtual IContent ReadThrough(ContentReference contentLink, string selectedLanguage, Func<IContent> readValue)
Parameters
Type Name Description
ContentReference contentLink
System.String selectedLanguage
System.Func<IContent> readValue
Returns
Type Description
IContent

TryGet(ContentReference, String, out IContent)

Declaration
public virtual bool TryGet(ContentReference contentLink, string language, out IContent instance)
Parameters
Type Name Description
ContentReference contentLink
System.String language
IContent instance
Returns
Type Description
System.Boolean

Implements

Extension Methods