Index: library/Zend/Cache/Backend/Static.php =================================================================== --- library/Zend/Cache/Backend/Static.php (revision 21752) +++ library/Zend/Cache/Backend/Static.php (working copy) @@ -223,7 +223,9 @@ } $pathName = realpath($this->_options['public_dir']) . dirname($id); - $this->_createDirectoriesFor($pathName); + if (!is_dir($pathName)) { + mkdir($pathName, $this->_octdec($this->_options['cache_directory_umask']), true); + } if (is_null($id) || strlen($id) == 0) { $dataUnserialized = unserialize($data); @@ -257,21 +259,6 @@ } /** - * Recursively create the directories needed to write the static file - */ - protected function _createDirectoriesFor($path) - { - $parts = explode('/', $path); - $directory = ''; - foreach ($parts as $part) { - $directory = rtrim($directory, '/') . '/' . $part; - if (!is_dir($directory)) { - mkdir($directory, $this->_octdec($this->_options['cache_directory_umask'])); - } - } - } - - /** * Detect serialization of data (cannot predict since this is the only way * to obey the interface yet pass in another parameter). *