1 | <?php |
||
15 | class MemcacheStore implements StoreInterface |
||
16 | { |
||
17 | /** |
||
18 | * Memcache instance |
||
19 | */ |
||
20 | protected $memcache; |
||
21 | protected $connected = false; |
||
22 | |||
23 | /** |
||
24 | * Creates a Memcache store |
||
25 | * |
||
26 | * @param Memcache $memcache |
||
27 | */ |
||
28 | public function __construct(Memcache $memcache) |
||
32 | |||
33 | /** |
||
34 | * Creates MemcacheStore instance. |
||
35 | * |
||
36 | * @param array $config Server Configurations |
||
37 | * |
||
38 | * @return MemcacheStore |
||
39 | */ |
||
40 | public static function factory(array $config = array()) |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function add($key, $value, $ttl = 0) |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function set($key, $value, $ttl = 0) |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public function get($key) |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function has($key) |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function delete($key) |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function flush() |
||
106 | |||
107 | /** |
||
108 | * Checks is the memcache server is running |
||
109 | * |
||
110 | * @return boolean |
||
111 | */ |
||
112 | public function checkRunning() |
||
116 | } |
||
117 |