Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function get($key, $default = null){ |
||
24 | $this->checkKey($key); |
||
25 | |||
26 | if(isset($this->cache[$key])){ |
||
27 | |||
28 | if($this->cache[$key]['ttl'] === null || $this->cache[$key]['ttl'] > time()){ |
||
29 | return $this->cache[$key]['content']; |
||
30 | } |
||
31 | |||
32 | unset($this->cache[$key]); |
||
33 | } |
||
34 | |||
35 | return $default; |
||
36 | } |
||
69 |