[ez4] How to find the path of a cache-block in var ?

Author Message

Bin LIU

Sunday 10 February 2008 2:50:26 am

I open this topic for ez4.

How to find the path of a cache-block in var ?

    static function cachePath( $keyString, $nodeID )
    {
        //include_once( 'lib/ezutils/classes/ezsys.php' );
        $filename = eZSys::ezcrc32( $keyString ) . ".cache";

        $phpDir = eZTemplateCacheBlock::templateBlockCacheDir();
        $nodeID = false;
        if ( is_numeric( $nodeID ) )
        {
            $phpDir .= eZTemplateCacheBlock::calculateSubtreeCacheDir( $nodeID, $filename );
        }
        else
        {
            $phpDir .= $filename[0] . '/' . $filename[1] . '/' . $filename[2];
        }

        $phpPath = $phpDir . '/' . $filename;
        return $phpPath;
    }
 

1. For the path cache of cache-block with subtree

We can find it in /var/siteaccess/cache/template-block/ $nodeID[0] / $nodeID[1] / $nodeID[2]

2. But for the path cache of cache-block without subtree, we must have the $keyArray

$keyArray = array( $keys, $placementString, $accessName );

what is the $keys, $placementString ? ?

Thanks

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info

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