Cache/Frontend/File.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Cache  
Subpackage
Zend_Cache_Frontend  
Version
$Id$  

\Zend_Cache_Frontend_File

Package: Zend_Cache\Zend_Cache_Frontend
Parent(s)
\Zend_Cache_Core
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  MODE_AND = 'AND'
Consts for master_files_mode
>VConstant  MODE_OR = 'OR'

Properties

>VPropertyprivatearray $_masterFile_mtimes = null
Master file mtimes
Array of int
Default valuenullDetails
Type
array
>VPropertyprotectedarray $_specificOptions = array('master_file' => null, 'master_files' => null, 'master_files_mode' => 'OR', 'ignore_missing_master_files' => false)
Available options
====> (string) master_file : - a complete path of the master file - deprecated (see master_files) ====> (array) master_files : - an array of complete path of master files - this option has to be set ! ====> (string) master_files_mode : - Zend_Cache_Frontend_File::MODE_AND or Zend_Cache_Frontend_File::MODE_OR - if MODE_AND, then all master files have to be touched to get a cache invalidation - if MODE_OR (default), then a single touched master file is enough to get a cache invalidation ====> (boolean) ignore_missing_master_files - if set to true, missing master files are ignored silently - if set to false (default), an exception is thrown if there is a missing master file
Default valuearray('master_file' => null, 'master_files' => null, 'master_files_mode' => 'OR', 'ignore_missing_master_files' => false)Details
Type
array

Methods

methodpublic__construct(array $options = array()) : void

Constructor

Parameters
NameTypeDescription
$optionsarray

Associative array of options

Throws
ExceptionDescription
\Zend_Cache_Exception
methodpublicload(string $id, boolean $doNotTestCacheValidity = false, boolean $doNotUnserialize = false) : mixed | false

Test if a cache is available for the given id and (if yes) return it (false else)

Parameters
NameTypeDescription
$idstring

Cache id

$doNotTestCacheValidityboolean

If set to true, the cache validity won't be tested

$doNotUnserializeboolean

Do not serialize (even if automatic_serialization is true) => for internal use

Returns
TypeDescription
mixed | falseCached datas
methodpublicsetMasterFile(string $masterFile) : void

Change the master_file option

To keep the compatibility
Parameters
NameTypeDescription
$masterFilestring

the complete path and name of the master file

Details
Deprecated
 
methodpublicsetMasterFiles(array $masterFiles) : void

Change the master_files option

Parameters
NameTypeDescription
$masterFilesarray

the complete paths and name of the master files

methodpublicsetOption(string $name, mixed $value) : void

Public frontend to set an option

Just a wrapper to get a specific behaviour for master_file
Parameters
NameTypeDescription
$namestring

Name of the option

$valuemixed

Value of the option

Throws
ExceptionDescription
\Zend_Cache_Exception
methodpublictest(string $id) : int | false

Test if a cache is available for the given id

Parameters
NameTypeDescription
$idstring

Cache id

Returns
TypeDescription
int | falseLast modified time of cache entry if it is available, false otherwise
Documentation was generated by phpDocumentor 2.2.0 .