class RedisStore implements StoreInterface
RedisStore is a StoreInterface implementation using Redis as store engine.
__construct(Redis|RedisArray|RedisCluster|Client $redisClient, float $initialTtl = 300.0) | ||
save(Key $key) Stores the resource if it's not locked by someone else. | ||
waitAndSave(Key $key) Waits until a key becomes free, then stores the resource. | ||
putOffExpiration(Key $key, $ttl) Extends the ttl of a resource. | ||
delete(Key $key) Removes a resource from the storage. | ||
bool | exists(Key $key) Returns whether or not the resource exists in the storage. |
Redis|RedisArray|RedisCluster|Client | $redisClient | |
float | $initialTtl | the expiration delay of locks in seconds |
Stores the resource if it's not locked by someone else.
Key | $key |
LockConflictedException |
Waits until a key becomes free, then stores the resource.
If the store does not support this feature it should throw a NotSupportedException.
Key | $key |
LockConflictedException | |
NotSupportedException |
Extends the ttl of a resource.
If the store does not support this feature it should throw a NotSupportedException.
Key | $key | |
$ttl |
LockConflictedException | |
NotSupportedException |
Removes a resource from the storage.
Key | $key |
Returns whether or not the resource exists in the storage.
Key | $key |
bool |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Lock/Store/RedisStore.html