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.

eZ debug

Timing: Jan 31 2025 01:32:33
Script start
Timing: Jan 31 2025 01:32:33
Module start 'layout'
Timing: Jan 31 2025 01:32:33
Module start 'content'
Timing: Jan 31 2025 01:32:33
Module end 'content'
Timing: Jan 31 2025 01:32:33
Script end

Main resources:

Total runtime0.0291 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.0313151.1953
Module start 'layout' 0.00530.0049 739.2266220.6563
Module start 'content' 0.01010.0172 959.8828997.7891
Module end 'content' 0.02730.0018 1,957.671929.9922
Script end 0.0291  1,987.6641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002910.1212140.0002
Check MTime0.00144.6382140.0001
Mysql Total
Database connection0.00072.389510.0007
Mysqli_queries0.003010.286630.0010
Looping result0.00000.072010.0000
Template Total0.00134.410.0013
Template load0.00103.475010.0010
Template processing0.00030.920110.0003
Override
Cache load0.00072.410810.0007
General
dbfile0.003311.467080.0004
String conversion0.00000.024640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs