Conditions | 3 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | public function save($key, CacheEntry $data) |
||
44 | { |
||
45 | try { |
||
46 | $lifeTime = $data->getTTL(); |
||
47 | if ($lifeTime >= 0) { |
||
48 | return $this->cache->save( |
||
49 | $key, |
||
50 | serialize($data), |
||
51 | $lifeTime |
||
52 | ); |
||
53 | } |
||
54 | } catch (\Exception $ignored) { |
||
55 | // No fail if we can't save it the storage |
||
56 | } |
||
57 | |||
58 | return false; |
||
59 | } |
||
60 | |||
66 |