Package DE_EPAGES::Object::API::PageCache
Interface for page cache handling.
Functions
clearObjectCache
Deletes all pages of a given object from the cache.
Syntax |
$PageCache->clearObjectCache($Object); |
Input |
|
clearSiteCache
Deletes all pages of a given site from the cache.
Syntax |
$PageCache->clearSiteCache($Site); |
Input |
|
compute
Gets a page from the cache or computes a new page and stores it in the cache. Returns $Content = undef if the content has not been modified since $IfModifiedSince.
Syntax |
($Content, LastModified) = $PageCache->compute($Object, $CacheKeyPart, $IfModifiedSince, $Sub); |
Example |
($Content, LastModified) = $PageCache->compute($Object, 'View_en_GB', time() - 100, sub { return "Today is: ".scalar(localtime), 1 }; ); |
Input |
|
Return |
|
new
Creates a PageCache object for a Site.
Syntax |
$PageCache = DE_EPAGES::Object::API::PageCache->new( %Options ); |
Example |
$PageCache = DE_EPAGES::Object::API::PageCache->new( Site => $Site ); |
Input |
|
Return |
|