Unverified Commit 1cf005af authored by Drew Phillips's avatar Drew Phillips Committed by GitHub
Browse files

Use Redis::expire() instead of setTimeout - #110

parent 39814214
No related merge requests found
Showing with 5 additions and 1 deletion
+5 -1
...@@ -48,7 +48,11 @@ class Redis implements AdapterInterface ...@@ -48,7 +48,11 @@ class Redis implements AdapterInterface
} }
if ($this->redis->hMSet($captchaId, $hash)) { if ($this->redis->hMSet($captchaId, $hash)) {
$this->redis->setTimeout($captchaId, $this->expiration); if (method_exists($redis, 'expire')) {
$this->redis->expire($captchaId, $this->expiration);
} else {
$this->redis->setTimeout($captchaId, $this->expiration);
}
return true; return true;
} else { } else {
return false; return false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment