Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function load(): array |
||
31 | { |
||
32 | $cacheItem = $this->cache->getItem(self::CACHE_KEY); |
||
33 | $lookup = null; //$cacheItem->get(); |
||
34 | if ($lookup === null) { |
||
|
|||
35 | $lookup = $this->loadUncached(); |
||
36 | $cacheItem->set($lookup) |
||
37 | ->expiresAfter(\DateInterval::createFromDateString(self::CACHE_TIME)); |
||
38 | $this->cache->save($cacheItem); |
||
39 | } |
||
40 | return $lookup; |
||
41 | } |
||
68 |