Author Topic

Jérôme Vieilledent

Tuesday 10 February 2009 9:18:08 am

Comment50684

Thanks André

I just checked the eZTemplateCacheBlock class. There is an example in the static method <b> eZTemplateCacheBlock::retrieve()</b> :

     list($handler, $data) = eZTemplateCacheBlock::retrieve( array( 'my_cool_key', $id, ), $nodeID, 60 ); // lives 60 seconds
     if ( !$data instanceof eZClusterFileFailure )
     {
         echo $data;
     }
     else
     {
         // ... generate the data
         $data = '...';
         $handler->storeCache( array( 'scope'      => 'template-block',
                                      'binarydata' => $data ) );
     }

But what's the class for <i>$handler</i> in the else section ? I searched in the API doc and I found eZFSFileHandler but the <i>storeCache()</i> method seems to be private.
The doc says : <i>This method is just a continuation of the code in processCache() and is not meant to be called alone since it relies on specific state in the database.</i>
This method is very convenient but will it be still accessible in future releases ?

Thanks