| @@ -65,12 +65,11 @@ | ||
| 65 | 65 | * Saves the value in the cache when that is available. |
| 66 | 66 | * |
| 67 | 67 | * @param mixed $k |
| 68 | 68 | * @param mixed $v |
| 69 | - * @param int|null $lifetime | |
| 70 | 69 | * @return mixed |
| 71 | 70 | */ |
| 72 | - private function setCachedValue($k, $v, ?int $lifetime = null) | |
| 71 | + private function setCachedValue($k, $v) | |
| 73 | 72 | { |
| 74 | 73 | if (is_null($this->cache)) { |
| 75 | 74 | return null; |
| 76 | 75 | } |
| @@ -81,9 +80,9 @@ | ||
| 81 | 80 | } |
| 82 | 81 | |
| 83 | 82 | $cacheItem = $this->cache->getItem($key); |
| 84 | 83 | $cacheItem->set($v); |
| 85 | - $cacheItem->expiresAfter($lifetime ?? $this->cacheConfig['lifetime']); | |
| 84 | + $cacheItem->expiresAfter($this->cacheConfig['lifetime']); | |
| 86 | 85 | return $this->cache->save($cacheItem); |
| 87 | 86 | } |
| 88 | 87 | |
| 89 | 88 | /** |
| @@ -95,9 +94,9 @@ | ||
| 95 | 94 | if (is_null($key)) { |
| 96 | 95 | return null; |
| 97 | 96 | } |
| 98 | 97 | |
| 99 | - $key = ($this->cacheConfig['prefix'] ?? '') . $key; | |
| 98 | + $key = $this->cacheConfig['prefix'] . $key; | |
| 100 | 99 | |
| 101 | 100 | // ensure we do not have illegal characters |
| 102 | 101 | $key = preg_replace('|[^a-zA-Z0-9_\.!]|', '', $key); |
| 103 | 102 | |