ZF-6153: Cache Page does not generate cache id when configured minimaly

Description

if cache is factored like this:

$backendOptions['cache_dir'] = APPLICATION_PATH . '/../cache'; $cache = Zend_Cache::factory('Page', 'File', array(), $backendOptions);
$cache->start();

the _makeId() function in Zend_Cache_Frontend_Page always returns false.

If I change the _makeId() function to :

protected function _makeId()
{
    $tmp = $_SERVER['REQUEST_URI'];
    foreach (array('Get', 'Post', 'Session', 'Files', 'Cookie') as $arrayName) {
        $tmp2 = $this->_makePartialId($arrayName, $this->_activeOptions['cache_with_' . strtolower($arrayName) . '_variables'], $this->_activeOptions['make_id_with_' . strtolower($arrayName) . '_variables']);
        if ($tmp2===false) {
            continue;
        }
        $tmp = $tmp . $tmp2;
    }
    return md5($tmp);
}

it seems to work....

Comments

SVN trunk seems to work for me, can you give it a try ?


<?php

require_once 'Zend/Cache.php';

$frontendOptions = array();
$backendOptions = array('cache_dir' => '/tmp/');
$cache = Zend_Cache::factory('Page', 'File', $frontendOptions, $backendOptions);

$cache->start();

echo date('l jS \of F Y h:i:s A');

I close this issue due to the lack of activity