internal package Foswiki::PageCache

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

internal package Foswiki::PageCache

Interface to the caching infrastructure.

ClassMethod new( $session ) → $object

Construct a new page cache and a delegator.

ObjectMethod genVariationKey() → $key

Generate a key for the current webtopic being produced; this reads information from the current session and url params, as follows: * The server serving the request (HTTP_HOST) * The port number of the server serving the request (HTTP_PORT) * The language of the current session, if any * All session parameters EXCEPT: o Those starting with an underscore o VALIDATION o REMEMBER o FOSWIKISTRIKEONE.* o VALID_ACTIONS.* o BREADCRUMB_TRAIL * All HTTP request parameters EXCEPT: o All those starting with an underscore o refresh o foswiki_redirect_cache o logout o style.* o switch.* o topic

ObjectMethod cachePage($contentType, $text) → $boolean

Cache a html page. every page is stored in a page bucket that contains all variations (stored for other users or other session parameters) of this page, as well as dependency and expiration information

Note that the dependencies are fired in reverse order as the depending pages have to notify this page if they changed.

ObjectMethod getPage($web, $topic)

Retrieve a html page for the given web.topic from cache, using a variation key based on the current session.

ObjectMethod addDependency($web, $topic)

Add a web.topic to the dependencies of the current page

ObjectMethod getDependencies($web, $topic, $variationKey) → \@deps

Return dependencies for a given web.topic

ObjectMethod getRevDependencies($web, $topic) → \@deps

Return reverse dependencies for a given web.topic (those topics that depend on this topic)

ObjectMethod getWebDependencies($web) → \@deps

Returns dependencies that hold for all topics in a web.

ObjectMethod deletePage($web, $topic)

Remove a page from the cache; this removes all of the information that we have about this page

ObjectMethod fireDependency($web, $topic)

Fire a dependency invalidating the related cache entries.

ObjectMethod renderDirtyAreas($text)

Extract dirty areas and render them; this happens after storing a page including the un-rendered dirty areas into the cache and after retrieving it again.

ObjectMethod finish()

Break cyclic dependencies during destruction.

Topic revision: r1 - 19 Apr 2011, ProjectContributor
This site is powered by FoswikiCopyright © CC-BY-SA by the contributing authors. All material on this collaboration platform is copyrighted under CC-BY-SA by the contributing authors unless otherwise noted.
Ideas, requests, problems regarding Foswiki? Send feedback