7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
17 * @subpackage Zend_Cache_Backend
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
20 * @version $Id: ExtendedInterface.php 24593 2012-01-05 20:35:02Z matthew $
24 * @see Zend_Cache_Backend_Interface
26 //require_once 'Zend/Cache/Backend/Interface.php';
27 require_once dirname(__FILE__
).'/Interface.php';
31 * @subpackage Zend_Cache_Backend
32 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
33 * @license http://framework.zend.com/license/new-bsd New BSD License
35 interface Zend_Cache_Backend_ExtendedInterface
extends Zend_Cache_Backend_Interface
39 * Return an array of stored cache ids
41 * @return array array of stored cache ids (string)
43 public function getIds();
46 * Return an array of stored tags
48 * @return array array of stored tags (string)
50 public function getTags();
53 * Return an array of stored cache ids which match given tags
55 * In case of multiple tags, a logical AND is made between tags
57 * @param array $tags array of tags
58 * @return array array of matching cache ids (string)
60 public function getIdsMatchingTags($tags = array());
63 * Return an array of stored cache ids which don't match given tags
65 * In case of multiple tags, a logical OR is made between tags
67 * @param array $tags array of tags
68 * @return array array of not matching cache ids (string)
70 public function getIdsNotMatchingTags($tags = array());
73 * Return an array of stored cache ids which match any given tags
75 * In case of multiple tags, a logical AND is made between tags
77 * @param array $tags array of tags
78 * @return array array of any matching cache ids (string)
80 public function getIdsMatchingAnyTags($tags = array());
83 * Return the filling percentage of the backend storage
85 * @return int integer between 0 and 100
87 public function getFillingPercentage();
90 * Return an array of metadatas for the given cache id
92 * The array must include these keys :
93 * - expire : the expire timestamp
94 * - tags : a string array of tags
95 * - mtime : timestamp of last modification time
97 * @param string $id cache id
98 * @return array array of metadatas (false if the cache id is not found)
100 public function getMetadatas($id);
103 * Give (if possible) an extra lifetime to the given cache id
105 * @param string $id cache id
106 * @param int $extraLifetime
107 * @return boolean true if ok
109 public function touch($id, $extraLifetime);
112 * Return an associative array of capabilities (booleans) of the backend
114 * The array must include these keys :
115 * - automatic_cleaning (is automating cleaning necessary)
116 * - tags (are tags supported)
117 * - expired_read (is it possible to read expired cache records
118 * (for doNotTestCacheValidity option for example))
119 * - priority does the backend deal with priority when saving
120 * - infinite_lifetime (is infinite lifetime can work with this backend)
121 * - get_list (is it possible to get the list of cache ids and the complete list of tags)
123 * @return array associative of with capabilities
125 public function getCapabilities();