Table of Contents

Class CachePageStatePersister

Namespace
InSite.Web.Optimization
Assembly
InSite.UI.dll
public class CachePageStatePersister : PageStatePersister
Inheritance
CachePageStatePersister
Inherited Members

Constructors

CachePageStatePersister(Page)

public CachePageStatePersister(Page page)

Parameters

page Page

Methods

Load()

Overridden by derived classes to deserialize and load persisted state information when a page initializes its control hierarchy.

1. Get the viewstate key from the hidden form field 2. Retrieved the serialized viewstate object from the physical cache 3. deserialize the vs into a pair object 4. populate our viewstate and control state objects in the page

public override void Load()

Save()

Overridden by derived classes to serialize persisted state information when a page is unloaded from memory.

1. Save our viewstate and controlstate to a new pair object 2. Serialize the pair object to a string 3. Save the string to persistant storage (cache folder) 4. save the pointer to the file in Page Cache 5. Save the cache pointer to a hidden field object on the page

public override void Save()

ViewStateCacheRemoveCallback(string, object, CacheItemRemovedReason)

Removes the persisted storage of the cache object from the cache folder.

public static void ViewStateCacheRemoveCallback(string key, object value, CacheItemRemovedReason reason)

Parameters

key string
value object
reason CacheItemRemovedReason