*prechod na novsiu verziu ZF
[sport-group.git] / library / Zend / Cache / Backend / ExtendedInterface.php
blob22e559b25babf7c5ee00cf00325ac6bc5b4ea0a5
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
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.
15 * @category Zend
16 * @package Zend_Cache
17 * @subpackage Zend_Cache_Backend
18 * @copyright Copyright (c) 2005-2009 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 16971 2009-07-22 18:05:45Z mikaelkael $
23 /**
24 * @see Zend_Cache_Backend_Interface
26 require_once 'Zend/Cache/Backend/Interface.php';
28 /**
29 * @package Zend_Cache
30 * @subpackage Zend_Cache_Backend
31 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
32 * @license http://framework.zend.com/license/new-bsd New BSD License
34 interface Zend_Cache_Backend_ExtendedInterface extends Zend_Cache_Backend_Interface
37 /**
38 * Return an array of stored cache ids
40 * @return array array of stored cache ids (string)
42 public function getIds();
44 /**
45 * Return an array of stored tags
47 * @return array array of stored tags (string)
49 public function getTags();
51 /**
52 * Return an array of stored cache ids which match given tags
54 * In case of multiple tags, a logical AND is made between tags
56 * @param array $tags array of tags
57 * @return array array of matching cache ids (string)
59 public function getIdsMatchingTags($tags = array());
61 /**
62 * Return an array of stored cache ids which don't match given tags
64 * In case of multiple tags, a logical OR is made between tags
66 * @param array $tags array of tags
67 * @return array array of not matching cache ids (string)
68 */
69 public function getIdsNotMatchingTags($tags = array());
71 /**
72 * Return an array of stored cache ids which match any given tags
74 * In case of multiple tags, a logical AND is made between tags
76 * @param array $tags array of tags
77 * @return array array of any matching cache ids (string)
79 public function getIdsMatchingAnyTags($tags = array());
81 /**
82 * Return the filling percentage of the backend storage
84 * @return int integer between 0 and 100
86 public function getFillingPercentage();
88 /**
89 * Return an array of metadatas for the given cache id
91 * The array must include these keys :
92 * - expire : the expire timestamp
93 * - tags : a string array of tags
94 * - mtime : timestamp of last modification time
96 * @param string $id cache id
97 * @return array array of metadatas (false if the cache id is not found)
99 public function getMetadatas($id);
102 * Give (if possible) an extra lifetime to the given cache id
104 * @param string $id cache id
105 * @param int $extraLifetime
106 * @return boolean true if ok
108 public function touch($id, $extraLifetime);
111 * Return an associative array of capabilities (booleans) of the backend
113 * The array must include these keys :
114 * - automatic_cleaning (is automating cleaning necessary)
115 * - tags (are tags supported)
116 * - expired_read (is it possible to read expired cache records
117 * (for doNotTestCacheValidity option for example))
118 * - priority does the backend deal with priority when saving
119 * - infinite_lifetime (is infinite lifetime can work with this backend)
120 * - get_list (is it possible to get the list of cache ids and the complete list of tags)
122 * @return array associative of with capabilities
124 public function getCapabilities();