Issue Type: Docs: Problem Created: 2009-04-14T04:58:14.000+0000 Last Updated: 2009-08-21T20:58:11.000+0000 Status: Resolved Fix version(s): - 1.9.2 (25/Aug/09)
Reporter: Stefan Gehrig (sgehrig) Assignee: Satoru Yoshida (satoruyoshida) Tags: - Zend_Cache
Related issues: Attachments:
Due to its name sanitation in Zend_Cache::_normalizeName() Zend_Cache::factory() does not allow the creation of a Zend_Cache_Backend_TwoLevels backend on Linux systems (case-sensitive filenames) as Zend_Cache::_normalizeName() normalizes the string "TwoLevels" into "Twolevels" resulting in an include of "Zend/Cache/Backend/Twolevels.php" which fails on case-sensitive operating systems.
The currect hack is to set $customBackendNaming to true and use "Zend_Cache_Backend_TwoLevels" as the $backendName.
The fix should be no problem because the strtolower()-call in line 219 of Zend/Cache.php is not really necessary - although I suspect that this change will break backwards-compatibility.
Posted by Fabien MARTY (fab) on 2009-04-15T09:40:08.000+0000
as said in the online manual for ZendPlatform or ZendServer backend, you have to add a separator in the backend name (for example "Two Levels" instead of "TwoLevels")
so I change the issue into a documentation improvement (it's not explicitly said for this this particular backend)
Posted by Stefan Gehrig (sgehrig) on 2009-04-15T12:26:49.000+0000
Even if this is mentioned in the documentation, I'll consider this a "dirty" hack just to circumvent the real problem with the strtolower(). I actually can not think of a use-case where this strtolower() will be of any benefit at all besides compensating for sloppy coding. If I didn't break BC, I wouldn't see any problem removing this function-call.
Posted by Ilya Gruzinov (shagren) on 2009-04-29T03:47:06.000+0000
I use "Two_Levels" as backend name for Zend_Cache::factory(). All works fine.
Posted by Fabien MARTY (fab) on 2009-07-17T11:03:37.000+0000
change Assignee because I'm inactive now
Posted by Satoru Yoshida (satoruyoshida) on 2009-08-19T21:00:25.000+0000
Is this only document issue now? if so, I can add an example how to use into the document. :-) But if needs modify code, sadly ,I could not. :-(
<pre class="highlight"> $cache = Zend_Cache::factory('Core', 'Two Levels');
Posted by Stefan Gehrig (sgehrig) on 2009-08-19T23:27:02.000+0000
Currently I'd say we could live with an explicit remark in the manual.
Generally I think this is rather a code-issue. I'd be nice if you could at least change the manual to include an appropriate remark.
Posted by Satoru Yoshida (satoruyoshida) on 2009-08-21T09:24:23.000+0000
Hi, Stefan, thank You for comment.
I added the example to document at SVN r 17717, so I change the issue type from the Docs: Improvement to bug.
Posted by Satoru Yoshida (satoruyoshida) on 2009-08-21T20:57:14.000+0000
I tried step by step debugging over Zend_Cache_Backend class.
If we would use words that contains space mark or another mark like as ""Two Levels", I find we could get TwoLevels.php.
So, I close it as solved in next mini release, Docs:problem.
Have you found an issue?
See the Overview section for more details.