Issues

ZF-3923: Zend_Cache::factory does not allow for namespaced custom front- or backends

Issue Type: Bug Created: 2008-08-11T08:57:21.000+0000 Last Updated: 2008-08-12T08:32:33.000+0000 Status: Resolved Fix version(s): - 1.6.1 (15/Sep/08)

Reporter: Stefan Gehrig (sgehrig) Assignee: Fabien MARTY (fab) Tags: - Zend_Cache

Related issues: Attachments:

Description

Zend_Cache::factory() normalizes $frontend and $backend when $customFrontendNaming and/or $customBackendNaming is false by using Zend_Cache::_normalizeName(). Therefore to use custom namespaced front- and/or backends you have to pass true to those parameters respectively (logical because that's the reason for both parameters - to allow for custom back- or frontends). Later on in the factory() method there is a

<pre class="highlight">
if ($customFrontendNaming) {
    // we use this boolean to avoid an API break
    $frontendClass = 'Zend_Cache_Frontend_' . $frontend;
} else {
    $frontendClass = $frontend;
}

for frontends and a

<pre class="highlight">
if ($customBackendNaming) {
    // we use this boolean to avoid an API break
    $backendClass = 'Zend_Cache_Backend_' . $backend;
} else {
    $backendClass = $backend;
}

for backends. The if-conditions in line 105 and line 131 must be negated to read:

<pre class="highlight">
if (!$customFrontendNaming) {
    // we use this boolean to avoid an API break
    $frontendClass = 'Zend_Cache_Frontend_' . $frontend;
} else {
    $frontendClass = $frontend;
}

and

<pre class="highlight">
if (!$customBackendNaming) {
    // we use this boolean to avoid an API break
    $backendClass = 'Zend_Cache_Backend_' . $backend;
} else {
    $backendClass = $backend;
}

for custom naming to work.

Comments

Posted by Stefan Gehrig (sgehrig) on 2008-08-12T07:58:57.000+0000

Issue already fixed in trunk revision 10895. Thanks a lot!

Posted by Fabien MARTY (fab) on 2008-08-12T08:32:33.000+0000

fixed in SVN trunk and 1.6 branch

thanks

Have you found an issue?

See the Overview section for more details.

Copyright

© 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.

Contacts