@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | * @param string|int $ttl |
| 179 | 179 | * @return string |
| 180 | 180 | */ |
| 181 | - public function getCache(string $cacheKey, string $namespace = '', string|int $ttl = 3600) |
|
| 181 | + public function getCache(string $cacheKey, string $namespace = '', string | int $ttl = 3600) |
|
| 182 | 182 | { |
| 183 | 183 | |
| 184 | 184 | $ttl = CacheFileHelper::ttl($ttl, $this->defaultTTL); |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | * @param string|int $ttl |
| 264 | 264 | * @return array |
| 265 | 265 | */ |
| 266 | - public function getMany(array $cacheKeys, string $namespace = '', string|int $ttl = 3600) |
|
| 266 | + public function getMany(array $cacheKeys, string $namespace = '', string | int $ttl = 3600) |
|
| 267 | 267 | { |
| 268 | 268 | $ttl = CacheFileHelper::ttl($ttl, $this->defaultTTL); |
| 269 | 269 | $results = []; |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | * @param string|int $ttl |
| 310 | 310 | * @return void |
| 311 | 311 | */ |
| 312 | - public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string|int $ttl = 3600) |
|
| 312 | + public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string | int $ttl = 3600) |
|
| 313 | 313 | { |
| 314 | 314 | $cacheFile = $this->buildCacheFilePath($cacheKey, $namespace); |
| 315 | 315 | $data = $this->fileManager->serialize($cacheData); |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | * @param string $namespace |
| 347 | 347 | * @return void |
| 348 | 348 | */ |
| 349 | - public function renewCache(string $cacheKey, string|int $ttl, string $namespace = '') |
|
| 349 | + public function renewCache(string $cacheKey, string | int $ttl, string $namespace = '') |
|
| 350 | 350 | { |
| 351 | 351 | $cacheData = $this->getCache($cacheKey, $namespace); |
| 352 | 352 | if ($cacheData) { |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | return; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - $lastFlushTime = (int) $this->fileManager->readFile($this->lastFlushTimeFile); |
|
| 55 | + $lastFlushTime = (int)$this->fileManager->readFile($this->lastFlushTimeFile); |
|
| 56 | 56 | |
| 57 | 57 | if ((time() - $lastFlushTime) >= $flushAfterSeconds) { |
| 58 | 58 | $this->flushCache(); |