@@ 320-328 (lines=9) @@ | ||
317 | * @return bool |
|
318 | * @codeCoverageIgnore |
|
319 | */ |
|
320 | protected function cacheHas($key) |
|
321 | { |
|
322 | $cache = $this->getCache(); |
|
323 | try { |
|
324 | return $cache->has($key); |
|
325 | } catch (InvalidArgumentException $e) { |
|
326 | throw new LogicException("Cache check rejected key $key", 0, $e); |
|
327 | } |
|
328 | } |
|
329 | ||
330 | /** |
|
331 | * @param $key |
|
@@ 335-343 (lines=9) @@ | ||
332 | * @return mixed |
|
333 | * @codeCoverageIgnore |
|
334 | */ |
|
335 | protected function cacheGet($key) |
|
336 | { |
|
337 | $cache = $this->getCache(); |
|
338 | try { |
|
339 | return $cache->get($key); |
|
340 | } catch (InvalidArgumentException $e) { |
|
341 | throw new LogicException("Cache retrieval rejected key $key", 0, $e); |
|
342 | } |
|
343 | } |
|
344 | ||
345 | /** |
|
346 | * @param $key |
|
@@ 352-360 (lines=9) @@ | ||
349 | * @return mixed |
|
350 | * @codeCoverageIgnore |
|
351 | */ |
|
352 | protected function cacheSet($key, $value, $ttl = null) |
|
353 | { |
|
354 | $cache = $this->getCache(); |
|
355 | try { |
|
356 | return $cache->set($key, $value, $ttl); |
|
357 | } catch (InvalidArgumentException $e) { |
|
358 | throw new LogicException("Cache storage rejected key $key", 0, $e); |
|
359 | } |
|
360 | } |
|
361 | ||
362 | public function getCache() |
|
363 | { |