-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cache.php
56 lines (49 loc) · 1.21 KB
/
Cache.php
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
<?php
namespace qio {
interface Cache extends \ArrayAccess {
const STATE_HAS = 'has';
const STATE_LOAD = 'load';
const STATE_SAVE = 'save';
const STATE_DELETE = 'delete';
/**
* Checks if cache rules are enabled
* @return boolean
*/
public function isEnabled();
/**
* enable rules
* @return Cache\Base
*/
public function enable();
/**
* disable rules
* @return Cache\Base
*/
public function disable();
/**
* checks if item is available in cache
* @param string $id
* @return boolean
*/
function has($id);
/**
* loads item from cache into memory
* @param string $id
* @return boolean
*/
function load($id);
/**
* saves item from memory into cache
* @param string $id
* @param mixed $value
* @return boolean
*/
function save($id,$value);
/**
* deletes item from cache permanently
* @param string $id
* @return boolean
*/
function delete($id);
}
}