Skip to content

Commit

Permalink
Cast cache expiration in Redis::removeExpiredElements to string
Browse files Browse the repository at this point in the history
New version of redis require parameter max to function zRemRangeByScore as string
  • Loading branch information
tmihalicka committed Aug 9, 2023
1 parent a4c08dc commit 238fff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ganesha/Storage/Adapter/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function reset(): void
*/
private function removeExpiredElements(string $service): void
{
$expires = microtime(true) - $this->configuration->timeWindow();
$expires = (string)(microtime(true) - $this->configuration->timeWindow());

if ($this->redis->zRemRangeByScore($service, '-inf', $expires) === false) {
throw new StorageException('Failed to remove expired elements. service: ' . $service);
Expand Down

0 comments on commit 238fff9

Please sign in to comment.