web/lib/Zend/Cache/Frontend/File.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Cache
    16  * @package    Zend_Cache
    17  * @subpackage Zend_Cache_Frontend
    17  * @subpackage Zend_Cache_Frontend
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @version    $Id: File.php 23330 2010-11-14 20:08:09Z mabe $
    20  * @version    $Id: File.php 24593 2012-01-05 20:35:02Z matthew $
    21  */
    21  */
    22 
    22 
    23 
    23 
    24 /**
    24 /**
    25  * @see Zend_Cache_Core
    25  * @see Zend_Cache_Core
    28 
    28 
    29 
    29 
    30 /**
    30 /**
    31  * @package    Zend_Cache
    31  * @package    Zend_Cache
    32  * @subpackage Zend_Cache_Frontend
    32  * @subpackage Zend_Cache_Frontend
    33  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    33  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    34  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    34  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    35  */
    35  */
    36 class Zend_Cache_Frontend_File extends Zend_Cache_Core
    36 class Zend_Cache_Frontend_File extends Zend_Cache_Core
    37 {
    37 {
    38 
    38 
   108         $this->_masterFile_mtimes = array();
   108         $this->_masterFile_mtimes = array();
   109 
   109 
   110         clearstatcache();
   110         clearstatcache();
   111         $i = 0;
   111         $i = 0;
   112         foreach ($masterFiles as $masterFile) {
   112         foreach ($masterFiles as $masterFile) {
   113             $mtime = @filemtime($masterFile);
   113             if (file_exists($masterFile)) {
       
   114                 $mtime = filemtime($masterFile);
       
   115             } else {
       
   116                 $mtime = false;
       
   117             }
   114 
   118 
   115             if (!$this->_specificOptions['ignore_missing_master_files'] && !$mtime) {
   119             if (!$this->_specificOptions['ignore_missing_master_files'] && !$mtime) {
   116                 Zend_Cache::throwException('Unable to read master_file : ' . $masterFile);
   120                 Zend_Cache::throwException('Unable to read master_file : ' . $masterFile);
   117             }
   121             }
   118 
   122 
   119             $this->_masterFile_mtimes[$i] = $mtime;
   123             $this->_masterFile_mtimes[$i] = $mtime;
   120             $this->_specificOptions['master_files'][$i] = $masterFile;
   124             $this->_specificOptions['master_files'][$i] = $masterFile;
   121             if ($i === 0) { // to keep a compatibility
   125             if ($i === 0) { // to keep a compatibility
   122                 $this->_specificOptions['master_files'] = $masterFile;
   126                 $this->_specificOptions['master_file'] = $masterFile;
   123             }
   127             }
   124 
   128 
   125             $i++;
   129             $i++;
   126         }
   130         }
   127     }
   131     }