1 | <?php |
||
32 | class Memory implements CacheInterface |
||
33 | { |
||
34 | /** |
||
35 | * A static variable to keep the cache |
||
36 | * @var array |
||
37 | */ |
||
38 | private static $_aMemories = array(); |
||
39 | |||
40 | /** |
||
41 | * set a value |
||
42 | * |
||
43 | * @access public |
||
44 | * @param string $sName name of the session |
||
45 | * @param mixed $mValue value of this sesion var |
||
46 | * @param int $iFlag unused |
||
47 | * @param int $iExpire expiration of cache |
||
48 | * @return \Venus\lib\Cache\Apc |
||
49 | */ |
||
50 | public function set(string $sName, $mValue, int $iFlag = 0, int $iExpire = 0) |
||
55 | |||
56 | /** |
||
57 | * get a value |
||
58 | * |
||
59 | * @access public |
||
60 | * @param string $sName name of the session |
||
61 | * @param int $iFlags flags |
||
62 | * @param int $iTimeout expiration of cache |
||
63 | * @return mixed |
||
64 | */ |
||
65 | public function get(string $sName, int &$iFlags = null, int $iTimeout = 0) |
||
69 | |||
70 | /** |
||
71 | * delete a value |
||
72 | * |
||
73 | * @access public |
||
74 | * @param string $sName name of the session |
||
75 | * @return true |
||
76 | */ |
||
77 | public function delete(string $sName) |
||
82 | |||
83 | /** |
||
84 | * flush the cache |
||
85 | * |
||
86 | * @access public |
||
87 | * @return mixed |
||
88 | */ |
||
89 | public function flush() |
||
93 | } |
||
94 |