CacheInterface.php
978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* Created by PhpStorm.
* User: Zip
* Date: 14/12/9
* Time: 下午10:35
*/
namespace Hood\Cache;
interface CacheInterface
{
/**
* @param $key
* @return mixed
*/
public function get($key);
/**
* @param $key
* @param $value
* @param $minutes
* @return mixed
*/
public function add($key, $value, $minutes);
/**
* @param $key
* @param $value
* @param $minutes
* @return mixed
*/
public function set($key, $value, $minutes);
/**
* @param $key
* @param int $value
* @return mixed
*/
public function increment($key, $value = 1);
/**
* @param $key
* @param int $value
* @return mixed
*/
public function decrement($key, $value = 1);
/**
* @param $key
* @return mixed
*/
public function delete($key);
/**
* @param $tagName
* @return $this
*/
public function tag($tagName);
}