]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | /** | |
3 | * Zend Framework | |
4 | * | |
5 | * LICENSE | |
6 | * | |
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. | |
14 | * | |
15 | * @category Zend | |
16 | * @package Zend_Cache | |
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 $ | |
21 | */ | |
22 | ||
23 | /** | |
24 | * @see Zend_Cache_Backend_Interface | |
25 | */ | |
26 | //require_once 'Zend/Cache/Backend/Interface.php'; | |
27 | require_once dirname(__FILE__).'/Interface.php'; | |
28 | ||
29 | /** | |
30 | * @package Zend_Cache | |
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 | |
34 | */ | |
35 | interface Zend_Cache_Backend_ExtendedInterface extends Zend_Cache_Backend_Interface | |
36 | { | |
37 | ||
38 | /** | |
39 | * Return an array of stored cache ids | |
40 | * | |
41 | * @return array array of stored cache ids (string) | |
42 | */ | |
43 | public function getIds(); | |
44 | ||
45 | /** | |
46 | * Return an array of stored tags | |
47 | * | |
48 | * @return array array of stored tags (string) | |
49 | */ | |
50 | public function getTags(); | |
51 | ||
52 | /** | |
53 | * Return an array of stored cache ids which match given tags | |
54 | * | |
55 | * In case of multiple tags, a logical AND is made between tags | |
56 | * | |
57 | * @param array $tags array of tags | |
58 | * @return array array of matching cache ids (string) | |
59 | */ | |
60 | public function getIdsMatchingTags($tags = array()); | |
61 | ||
62 | /** | |
63 | * Return an array of stored cache ids which don't match given tags | |
64 | * | |
65 | * In case of multiple tags, a logical OR is made between tags | |
66 | * | |
67 | * @param array $tags array of tags | |
68 | * @return array array of not matching cache ids (string) | |
69 | */ | |
70 | public function getIdsNotMatchingTags($tags = array()); | |
71 | ||
72 | /** | |
73 | * Return an array of stored cache ids which match any given tags | |
74 | * | |
75 | * In case of multiple tags, a logical AND is made between tags | |
76 | * | |
77 | * @param array $tags array of tags | |
78 | * @return array array of any matching cache ids (string) | |
79 | */ | |
80 | public function getIdsMatchingAnyTags($tags = array()); | |
81 | ||
82 | /** | |
83 | * Return the filling percentage of the backend storage | |
84 | * | |
85 | * @return int integer between 0 and 100 | |
86 | */ | |
87 | public function getFillingPercentage(); | |
88 | ||
89 | /** | |
90 | * Return an array of metadatas for the given cache id | |
91 | * | |
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 | |
96 | * | |
97 | * @param string $id cache id | |
98 | * @return array array of metadatas (false if the cache id is not found) | |
99 | */ | |
100 | public function getMetadatas($id); | |
101 | ||
102 | /** | |
103 | * Give (if possible) an extra lifetime to the given cache id | |
104 | * | |
105 | * @param string $id cache id | |
106 | * @param int $extraLifetime | |
107 | * @return boolean true if ok | |
108 | */ | |
109 | public function touch($id, $extraLifetime); | |
110 | ||
111 | /** | |
112 | * Return an associative array of capabilities (booleans) of the backend | |
113 | * | |
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) | |
122 | * | |
123 | * @return array associative of with capabilities | |
124 | */ | |
125 | public function getCapabilities(); | |
126 | ||
127 | } |