web/lib/Zend/Cache/Backend/ExtendedInterface.php
changeset 64 162c1de6545a
parent 19 1c2f13fd785c
child 68 ecaf28ffe26e
equal deleted inserted replaced
63:5b37998e522e 64:162c1de6545a
       
     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-2010 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 20096 2010-01-06 02:05:09Z bkarwin $
       
    21  */
       
    22 
       
    23 /**
       
    24  * @see Zend_Cache_Backend_Interface
       
    25  */
       
    26 require_once 'Zend/Cache/Backend/Interface.php';
       
    27 
       
    28 /**
       
    29  * @package    Zend_Cache
       
    30  * @subpackage Zend_Cache_Backend
       
    31  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    32  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    33  */
       
    34 interface Zend_Cache_Backend_ExtendedInterface extends Zend_Cache_Backend_Interface
       
    35 {
       
    36 
       
    37     /**
       
    38      * Return an array of stored cache ids
       
    39      *
       
    40      * @return array array of stored cache ids (string)
       
    41      */
       
    42     public function getIds();
       
    43 
       
    44     /**
       
    45      * Return an array of stored tags
       
    46      *
       
    47      * @return array array of stored tags (string)
       
    48      */
       
    49     public function getTags();
       
    50 
       
    51     /**
       
    52      * Return an array of stored cache ids which match given tags
       
    53      *
       
    54      * In case of multiple tags, a logical AND is made between tags
       
    55      *
       
    56      * @param array $tags array of tags
       
    57      * @return array array of matching cache ids (string)
       
    58      */
       
    59     public function getIdsMatchingTags($tags = array());
       
    60 
       
    61     /**
       
    62      * Return an array of stored cache ids which don't match given tags
       
    63      *
       
    64      * In case of multiple tags, a logical OR is made between tags
       
    65      *
       
    66      * @param array $tags array of tags
       
    67      * @return array array of not matching cache ids (string)
       
    68      */
       
    69     public function getIdsNotMatchingTags($tags = array());
       
    70 
       
    71     /**
       
    72      * Return an array of stored cache ids which match any given tags
       
    73      *
       
    74      * In case of multiple tags, a logical AND is made between tags
       
    75      *
       
    76      * @param array $tags array of tags
       
    77      * @return array array of any matching cache ids (string)
       
    78      */
       
    79     public function getIdsMatchingAnyTags($tags = array());
       
    80 
       
    81     /**
       
    82      * Return the filling percentage of the backend storage
       
    83      *
       
    84      * @return int integer between 0 and 100
       
    85      */
       
    86     public function getFillingPercentage();
       
    87 
       
    88     /**
       
    89      * Return an array of metadatas for the given cache id
       
    90      *
       
    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
       
    95      *
       
    96      * @param string $id cache id
       
    97      * @return array array of metadatas (false if the cache id is not found)
       
    98      */
       
    99     public function getMetadatas($id);
       
   100 
       
   101     /**
       
   102      * Give (if possible) an extra lifetime to the given cache id
       
   103      *
       
   104      * @param string $id cache id
       
   105      * @param int $extraLifetime
       
   106      * @return boolean true if ok
       
   107      */
       
   108     public function touch($id, $extraLifetime);
       
   109 
       
   110     /**
       
   111      * Return an associative array of capabilities (booleans) of the backend
       
   112      *
       
   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)
       
   121      *
       
   122      * @return array associative of with capabilities
       
   123      */
       
   124     public function getCapabilities();
       
   125 
       
   126 }