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) |
|
43 | |||
44 | 1 | public function clear($table, $connection_name) |
|
45 | { |
||
46 | 1 | if ($table == '') { |
|
47 | 1 | $this->pool->deleteItem($connection_name.'/*'); |
|
48 | 1 | } else { |
|
49 | 1 | $this->pool->deleteItem($connection_name.'/'.$table.'/*'); |
|
50 | } |
||
51 | 1 | } |
|
52 | |||
53 | 1 | public function genKey($query, $parameters, $table, $connection_name) |
|
60 | } |
||
61 |