File indexing completed on 2025-01-19 05:20:56
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Cache 0017 * @subpackage Zend_Cache_Backend 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 /** 0024 * @see Zend_Cache_Backend_Interface 0025 */ 0026 // require_once 'Zend/Cache/Backend/Interface.php'; 0027 0028 /** 0029 * @package Zend_Cache 0030 * @subpackage Zend_Cache_Backend 0031 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0032 * @license http://framework.zend.com/license/new-bsd New BSD License 0033 */ 0034 interface Zend_Cache_Backend_ExtendedInterface extends Zend_Cache_Backend_Interface 0035 { 0036 0037 /** 0038 * Return an array of stored cache ids 0039 * 0040 * @return array array of stored cache ids (string) 0041 */ 0042 public function getIds(); 0043 0044 /** 0045 * Return an array of stored tags 0046 * 0047 * @return array array of stored tags (string) 0048 */ 0049 public function getTags(); 0050 0051 /** 0052 * Return an array of stored cache ids which match given tags 0053 * 0054 * In case of multiple tags, a logical AND is made between tags 0055 * 0056 * @param array $tags array of tags 0057 * @return array array of matching cache ids (string) 0058 */ 0059 public function getIdsMatchingTags($tags = array()); 0060 0061 /** 0062 * Return an array of stored cache ids which don't match given tags 0063 * 0064 * In case of multiple tags, a logical OR is made between tags 0065 * 0066 * @param array $tags array of tags 0067 * @return array array of not matching cache ids (string) 0068 */ 0069 public function getIdsNotMatchingTags($tags = array()); 0070 0071 /** 0072 * Return an array of stored cache ids which match any given tags 0073 * 0074 * In case of multiple tags, a logical AND is made between tags 0075 * 0076 * @param array $tags array of tags 0077 * @return array array of any matching cache ids (string) 0078 */ 0079 public function getIdsMatchingAnyTags($tags = array()); 0080 0081 /** 0082 * Return the filling percentage of the backend storage 0083 * 0084 * @return int integer between 0 and 100 0085 */ 0086 public function getFillingPercentage(); 0087 0088 /** 0089 * Return an array of metadatas for the given cache id 0090 * 0091 * The array must include these keys : 0092 * - expire : the expire timestamp 0093 * - tags : a string array of tags 0094 * - mtime : timestamp of last modification time 0095 * 0096 * @param string $id cache id 0097 * @return array array of metadatas (false if the cache id is not found) 0098 */ 0099 public function getMetadatas($id); 0100 0101 /** 0102 * Give (if possible) an extra lifetime to the given cache id 0103 * 0104 * @param string $id cache id 0105 * @param int $extraLifetime 0106 * @return boolean true if ok 0107 */ 0108 public function touch($id, $extraLifetime); 0109 0110 /** 0111 * Return an associative array of capabilities (booleans) of the backend 0112 * 0113 * The array must include these keys : 0114 * - automatic_cleaning (is automating cleaning necessary) 0115 * - tags (are tags supported) 0116 * - expired_read (is it possible to read expired cache records 0117 * (for doNotTestCacheValidity option for example)) 0118 * - priority does the backend deal with priority when saving 0119 * - infinite_lifetime (is infinite lifetime can work with this backend) 0120 * - get_list (is it possible to get the list of cache ids and the complete list of tags) 0121 * 0122 * @return array associative of with capabilities 0123 */ 0124 public function getCapabilities(); 0125 0126 }