Add key expiration support in Redis class with expire method implementation
This commit is contained in:
@@ -379,5 +379,11 @@ class redis implements redis_i
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function expire(string $key, int $seconds): self
|
||||
{
|
||||
// Set the expiration time for a key
|
||||
$this->redis->expire($key, $seconds);
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user