1 | <?php |
||
8 | class ArrayCacheEngine implements CacheEngineInterface |
||
9 | { |
||
10 | |||
11 | protected $_L1Cache = array(); |
||
12 | |||
13 | protected $logger = null; |
||
14 | |||
15 | public function __construct($logger = null) |
||
22 | |||
23 | /** |
||
24 | * @param string $key The object KEY |
||
25 | * @param int $ttl IGNORED IN MEMCACHED. |
||
26 | * @return object Description |
||
27 | */ |
||
28 | public function get($key, $ttl = 0) |
||
40 | |||
41 | /** |
||
42 | * @param string $key The object Key |
||
43 | * @param object $object The object to be cached |
||
44 | * @param int $ttl The time to live in seconds of this objects |
||
45 | * @return bool If the object is successfully posted |
||
46 | */ |
||
47 | public function set($key, $object, $ttl = 0) |
||
55 | |||
56 | /** |
||
57 | * |
||
58 | * @param string $key |
||
59 | * @param string $str |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function append($key, $str) |
||
70 | |||
71 | /** |
||
72 | * Unlock resource |
||
73 | * @param string $key |
||
74 | */ |
||
75 | public function release($key) |
||
79 | |||
80 | /** |
||
81 | * Lock resource before set it. |
||
82 | * @param string $key |
||
83 | */ |
||
84 | public function lock($key) |
||
88 | |||
89 | /** |
||
90 | * UnLock resource after set it |
||
91 | * @param string $key |
||
92 | */ |
||
93 | public function unlock($key) |
||
97 | |||
98 | public function isAvailable() |
||
102 | } |
||
103 |