| Total Complexity | 5 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | class APCUCache extends CacheDriverAbstract{ |
||
| 20 | |||
| 21 | /** @inheritdoc */ |
||
| 22 | public function get($key, $default = null){ |
||
| 23 | $value = apcu_fetch($this->checkKey($key)); |
||
| 24 | |||
| 25 | if($value !== false){ |
||
| 26 | return $value; |
||
| 27 | } |
||
| 28 | |||
| 29 | return $default; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** @inheritdoc */ |
||
| 33 | public function set($key, $value, $ttl = null):bool{ |
||
| 34 | return (bool)apcu_store($this->checkKey($key), $value, $this->getTTL($ttl) ?? 0); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** @inheritdoc */ |
||
| 38 | public function delete($key):bool{ |
||
| 39 | return (bool)apcu_delete($this->checkKey($key)); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** @inheritdoc */ |
||
| 43 | public function clear():bool{ |
||
| 45 | } |
||
| 46 | |||
| 47 | } |
||
| 48 |