diff --git a/src/Ganesha/Storage.php b/src/Ganesha/Storage.php index 27b3a44..d7b9ebd 100644 --- a/src/Ganesha/Storage.php +++ b/src/Ganesha/Storage.php @@ -333,7 +333,12 @@ private function rejectionKey($service) */ private function lastFailureKey($service) { - return $this->prefix($service) . self::KEY_SUFFIX_LAST_FAILURE_TIME; + return $this->supportRollingTimeWindow() + // If the adapter supports RollingTimeWindow use failureKey() instead, + // because Redis doesn't save lastFailureTime. + // @see Ackintosh\Ganesha\Storage\Adapter\Redis#saveLastFailureTime() + ? $this->failureKey($service) + : $this->prefix($service) . self::KEY_SUFFIX_LAST_FAILURE_TIME; } /**