The dependency graph records all topics that have been touched while the current page is being computed. It also records the session and url parameters that were in use, part of which is the user name as well.
An edge in the dependency graph consists of:
For every cached page there's a record of meta data describing it:
ClassMethodnew( ) → $object
Construct a new page cache
ObjectMethodgenVariationKey() → $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 action used to render the page (view or rest) * 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 o DGP_hash * all HTTP request parameters EXCEPT: o All those starting with an underscore o refresh o foswiki_redirect_cache o logout o topic o cache_ignore o cache_expire
ObjectMethodcachePage($contentType, $data) → $boolean
Cache a 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
Retrieve a cached page for the given web.topic, using a variation key based on the current session.
ObjectMethodsetPageVariation($web, $topici, $variationKey, $variation) → $bool
stores a rendered page
ObjectMethodgetPageVariation($web, $topic, $variationKey)
retrievs a cache entry; returns undef if there is none.
Checks whether the current page is cacheable. It first checks the "refresh" url parameter and then looks out for the "CACHEABLE" preference variable.
Add a web.topic to the dependencies of the current page
ObjectMethodgetDependencies($web, $topic, $variationKey) → \@deps
Return dependencies for a given web.topic. if $variationKey is specified, only dependencies of this page variation will be returned.
ObjectMethodgetWebDependencies($web) → \@deps
Returns dependencies that hold for all topics in a web.
ObjectMethodsetDependencies($web, $topic, $variation, @topics)
Stores the dependencies for the given web.topic topic. Setting the dependencies happens at the very end of a rendering process of a page while it is about to be cached.When the optional @topics parameter isn't provided, then all dependencies collected in the Foswiki::PageCache object will be used. These dependencies are collected during the rendering process.
ObjectMethoddeleteDependencies($web, $topic, $variation, $force)
ObjectMethoddeletePage($web, $topic, $variation, $force)
Remove a page from the cache; this removes all of the information that we have about this page, including any dependencies that have been established while this page was created.
If $variation is specified, only this variation of $web.$topic will be removed. When $variation is not specified, all page variations of $web.$topic will be removed.When $force is true, the deletion will take place immediately. Otherwise all delete requests might be delayed and committed as part of Foswiki::PageCache::finish().
purges all of the cache
This method is called to remove all other cache entries that used the given $web.$topic as an ingredience to produce the page.
A dependency is a directed edge starting from a page variation being rendered towards a depending page that has been used to produce it.
While dependency edges are stored as they are collected during the rendering process, these edges are traversed in reverse order when a dependency is fired.
In addition all manually asserted dependencies of topics in a web are deleted, as well as the given topic itself.
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.
clean up finally