Issues

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

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


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

for frontends and a


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:


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

and


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

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

fixed in SVN trunk and 1.6 branch

thanks