root/trunk/src/main/php/net/stubbles/util/cache/stubCacheStrategy.php

Revision 1301, 1.3 kB (checked in by richi, 4 months ago)

coding standards: fixed coding standards issues (function docblock)

Line 
1 <?php
2 /**
3  * Interface for caching strategies.
4  *
5  * @author      Frank Kleine <mikey@stubbles.net>
6  * @package     stubbles
7  * @subpackage  util_cache
8  */
9 stubClassLoader::load('net::stubbles::util::cache::stubCacheContainer');
10 /**
11  * Interface for caching strategies.
12  *
13  * @package     stubbles
14  * @subpackage  util_cache
15  */
16 interface stubCacheStrategy extends stubObject, stubSerializable
17 {
18     /**
19      * checks whether an item is cacheable or not
20      *
21      * @param   stubCacheContainer  $container  the container to cache the data in
22      * @param   string              $key        the key to cache the data under
23      * @param   string              $data       data to cache
24      * @return  bool
25      */
26     public function isCachable(stubCacheContainer $container, $key, $data);
27
28     /**
29      * checks whether a cached item is expired
30      *
31      * @param   stubCacheContainer  $container  the container that contains the cached data
32      * @param   string              $key        the key where the data is cached under
33      * @return  bool
34      */
35     public function isExpired(stubCacheContainer $container, $key);
36
37     /**
38      * checks whether the garbage collection should be run
39      *
40      * @param   stubCacheContainer $container
41      * @return  bool
42      */
43     public function shouldRunGc(stubCacheContainer $container);
44 }
45 ?>
Note: See TracBrowser for help on using the browser.