Monday 07 July 2008 4:35:55 pm
Hi
in doxygen, i see eZTemplateCacheBlock is a nice tool to store caches from php: http://pubsvn.ez.no/doxygen/4.0/html/eztemplatecacheblock_8php-source.html
list($cacheHandler, $cachedContent) = eZTemplateCacheBlock::retrieve(
array('my/unique',$key), $subtreeExpiryNode, $timeoutInSeconds
);
if ( get_class( $cachedContent ) != 'ezclusterfilefailure' ) {
$somedata = unserialize($cachedContent);
} else {
$somedata = array(
"cached" => "stuff",
"here" => 24 );
$cacheHandler->storeCache( array(
'scope' => 'my-cool-stuff',
'binarydata' => serialize($somedata)
));
}
This should return a hash for $somedata, the first time from scratch, the second time from cache. $key is anything. $subtreeExpiryNode can be null. Cool. does anyone know what $cacheHandler->storeCache's 'scope' does ?
thanks, *-pike
---------------
The class eZContentObjectTreeNode does.
|