1 | <?php |
||
7 | class IdiormCache implements IdiormCacheInterface |
||
8 | { |
||
9 | /* @var $pool \Stash\Pool */ |
||
10 | private $pool; |
||
11 | |||
12 | /** |
||
13 | * @param string $path |
||
14 | * |
||
15 | * @throws \Exception |
||
16 | */ |
||
17 | 5 | public function __construct($path) |
|
26 | |||
27 | 1 | public function save($cache_key, $value, $table, $connection_name) |
|
33 | |||
34 | 1 | public function isHit($cache_key, $table, $connection_name) |
|
35 | { |
||
36 | 1 | $item = $this->pool->getItem($connection_name.'/'.$table.'/'.$cache_key); |
|
37 | 1 | if (!$item->isHit()) { |
|
38 | 1 | return false; |
|
39 | } |
||
40 | |||
41 | 1 | return $item->get(); |
|
42 | } |
||
43 | |||
44 | 1 | public function clear($table, $connection_name) |
|
48 | |||
49 | 1 | public function genKey($query, $parameters, $table, $connection_name) |
|
56 | } |
||
57 |