eZTemplateCacheBlock

Author Message

*- pike

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.

*- pike

Tuesday 08 July 2008 2:21:43 pm

after browsing more source code, i think the 'scope' is unused, actually ...

*-pike

---------------
The class eZContentObjectTreeNode does.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.