SaaS CMS has officially launched! Learn more now.

Class CacheService

Service that expose a short time cache to make it possible to pass none serializable objects (such as PageEventArgs) from outside to workflow instances. It also expose methods to get EPiServerData from Workflow instances. Primarly used when using other host than AspNet.

Inheritance
System.Object
CacheService
Implements
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.WorkflowFoundation.Services
Assembly: EPiServer.WorkflowFoundation.dll
Version: 7.19.2
Syntax
public abstract class CacheService : IPageSource

Constructors

CacheService()

Declaration
protected CacheService()

Properties

CurrentPage

Gets the current page.

Declaration
public abstract PageData CurrentPage { get; }
Property Value
Type Description
PageData

The current page.

Methods

AddItem(Object)

Adds an object to short time cache

Declaration
public abstract string AddItem(object item)
Parameters
Type Name Description
System.Object item

object to cache

Returns
Type Description
System.String

cache key

Remarks

The object is inserted in cache with a sliding expiration set to 10 minutes

AddItem(String, Object)

Adds an object to short time cache

Declaration
public abstract void AddItem(string cacheKey, object item)
Parameters
Type Name Description
System.String cacheKey

The cache key to associate with the cached item

System.Object item

object to cache

Remarks

The object is inserted in cache with a sliding expiration set to 10 minutes

GetChildren(PageReference)

Gets the children.

Declaration
public abstract PageDataCollection GetChildren(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link.

Returns
Type Description
PageDataCollection

The children for a page

GetItem(String)

Gets a cached object

Declaration
public abstract object GetItem(string key)
Parameters
Type Name Description
System.String key

cache key

Returns
Type Description
System.Object

cached object

GetPage(PageReference)

Gets the page.

Declaration
public abstract PageData GetPage(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link.

Returns
Type Description
PageData

The request page

Implements

Extension Methods