Cache/Backend/Static.php
- 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_Backend
- Version
- $Id$
\Zend_Cache_Backend_Static
- Implements
- Parent(s)
- \Zend_Cache_Backend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties

array $_options = array('public_dir' => null, 'sub_dir' => 'html', 'file_extension' => '.html', 'index_filename' => 'index', 'file_locking' => true, 'cache_file_perm' => 384, 'cache_directory_perm' => 448, 'debug_header' => false, 'tag_cache' => null, 'disable_caching' => false)array('public_dir' => null, 'sub_dir' => 'html', 'file_extension' => '.html', 'index_filename' => 'index', 'file_locking' => true, 'cache_file_perm' => 384, 'cache_directory_perm' => 448, 'debug_header' => false, 'tag_cache' => null, 'disable_caching' => false)Details- Type
- array

\Zend_Cache_Core $_tagCache = nullnullDetails- Type
- \Zend_Cache_Core
Methods

_createDirectoriesFor( $path) : voidRecursively create the directories needed to write the static file
| Name | Type | Description |
|---|---|---|
| $path |

_decodeId(string $id) : stringDecode a request URI from the provided ID
| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| string |

_isSerialized( $data) : voidDetect serialization of data (cannot predict since this is the only way to obey the interface yet pass in another parameter).
| Name | Type | Description |
|---|---|---|
| $data |

_octdec(string $val) : intDetect an octal string and return its octal value for file permission ops otherwise return the non-string (assumed octal or decimal int already)
| Name | Type | Description |
|---|---|---|
| $val | string | The potential octal in need of conversion |
| Type | Description |
|---|---|
| int |

_validateIdOrTag(string $string) : voidValidate a cache id or a tag (security, reliable filenames, reserved prefixes.
| Name | Type | Description |
|---|---|---|
| $string | string | Cache id or tag |
| Exception | Description |
|---|---|
| \Zend_Cache_Exception |
- Deprecated
- Not usable until perhaps ZF 2.0

_verifyPath(string $path) : boolVerify path exists and is non-empty
| Name | Type | Description |
|---|---|---|
| $path | string |
| Type | Description |
|---|---|
| bool |

clean(string $mode = \Zend_Cache::CLEANING_MODE_ALL, array $tags = array()) : booleanClean some cache records
| Name | Type | Description |
|---|---|---|
| $mode | string | Clean mode |
| $tags | array | Array of tags |
| Type | Description |
|---|---|
| boolean | true if no problem |

getOption(string $name) : mixedRetrieve any option via interception of the parent's statically held options including the local option for a tag cache.
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| mixed |

load(string $id, boolean $doNotTestCacheValidity = false) : string | falseTest if a cache is available for the given id and (if yes) return it (false else)
| Name | Type | Description |
|---|---|---|
| $id | string | Cache id |
| $doNotTestCacheValidity | boolean | If set to true, the cache validity won't be tested |
| Type | Description |
|---|---|
| string | false | cached datas |

remove(string $id) : booleanRemove a cache record
| Name | Type | Description |
|---|---|---|
| $id | string | Cache id |
| Type | Description |
|---|---|
| boolean | True if no problem |

removeRecursively(string $id) : booleanRemove a cache record recursively for the given directory matching a REQUEST_URI based relative path (deletes the actual file matching this in addition to the matching directory)
| Name | Type | Description |
|---|---|---|
| $id | string | Cache id |
| Type | Description |
|---|---|
| boolean | True if no problem |

save(string $data, string $id, array $tags = array(), int $specificLifetime = false) : booleanSave some string datas into a cache record
| Name | Type | Description |
|---|---|---|
| $data | string | Datas to cache |
| $id | string | Cache id |
| $tags | array | Array of strings, the cache record will be tagged by each string entry |
| $specificLifetime | int | If != false, set a specific lifetime for this cache record (null => infinite lifetime) |
| Type | Description |
|---|---|
| boolean | true if no problem |

setInnerCache( $cache) : voidSet an Inner Cache, used here primarily to store Tags associated with caches created by this backend. Note: If Tags are lost, the cache should be completely cleaned as the mapping of tags to caches will have been irrevocably lost.
| Name | Type | Description |
|---|---|---|
| $cache |

setOption(string $name, mixed $value) : \Zend_Cache_Backend_StaticInterceptor child method to handle the case where an Inner Cache object is being set since it's not supported by the standard backend interface
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | mixed |
| Type | Description |
|---|---|
| \Zend_Cache_Backend_Static |