1 <?php
2 /**
3 * Cross - a micro PHP 5 framework
4 *
5 * @link http://www.crossphp.com
6 * @license MIT License
7 */
8
9 namespace Cross\I;
10
11 /**
12 * Interface CacheInterface
13 *
14 * @package Cross\I
15 */
16 interface RequestCacheInterface
17 {
18 /**
19 * 写入缓存
20 *
21 * @param string $value
22 * @return mixed set
23 */
24 function set($value);
25
26 /**
27 * 获取缓存内容
28 *
29 * @return mixed get cache
30 */
31 function get();
32
33 /**
34 * 是否有效
35 *
36 * @return bool
37 */
38 function isValid();
39
40 /**
41 * 缓存配置
42 *
43 * @param array $config
44 * @return mixed
45 */
46 function setConfig(array $config = array());
47
48 /**
49 * 获取缓存配置
50 *
51 * @return mixed
52 */
53 function getConfig();
54 }
55