Quick question, I am running Zend Page Caching to cache some flickr photos
so that I don't have to pull the files down all the time since they don't
change.  My question is...

On the manual pages for Page Caching it says that you don't have to generate
the Id since it is generated automatically.  Here is that section,

On the other hand, the "cache id" is calculated automatically with
> $_SERVER['REQUEST_URI'] and (depending on options) $_GET, $_POST,
> $_SESSION, $_COOKIE, $_FILES. More over, you have only one method to call
> (start()) because the end() call is fully automatic when the page is
> ended.
>

However, When I don't specify a cache ID it doesn't cache, but when I
specify one the page gets cached.

Am I doing something wrong in the code?

I don't think there is a reason to test the cache since Page Caching either
pulls it or renders and caches it for the set lifetime.  Am I doing
something wrong?

-- Bootstrap
protected function _initCache()
    {
        $frontendOptions = array(
            'lifetime' => 30, // cache lifetime of 30 seconds
            'regexps' => array(
                   '^/index/flickr' => array(
                       'cache' => true,
                )
               ),
        );
        $backendOptions = array('cache_dir' => '/tmp/');
        $flickrCache = Zend_Cache::factory('Page', 'File', $frontendOptions,
$backendOptions);
        $flickrCache->start('flickr');
        //Zend_Registry::set('flickrCache', $flickrCache);
    }


Thanks!

-- 
Shaun J. Farrell
Washington, DC
(202) 713-5241
www.farrelley.com

Reply via email to