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

Issue Type: Bug Created: 2009-03-29T04:52:30.000+0000 Last Updated: 2009-04-24T12:27:36.000+0000 Status: Resolved Fix version(s): Reporter: Marin Klobusnik (matokl) Assignee: Fabien MARTY (fab) Tags: - Zend_Cache

Related issues: Attachments:


if cache is factored like this:

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

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) {
        $tmp = $tmp . $tmp2;
    return md5($tmp);

it seems to work....


Posted by Fabien MARTY (fab) on 2009-04-05T02:01:16.000+0000

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

<pre class="highlight">

require_once 'Zend/Cache.php';

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


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

Posted by Fabien MARTY (fab) on 2009-04-24T12:27:36.000+0000

I close this issue due to the lack of activity

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.