RedisStore
Extends
Implements
Properties
$prefix string
A string that should be prepended to keys.
$connection string
The Redis connection instance that should be used to manage locks.
$lockConnection string
The name of the connection that should be used for locks.
Methods
__construct ( Factory $redis , $prefix , $connection ) : void
Create a new Redis store.
Parameters
- $redis Factory
- $prefix string
- $connection string
get ( $key ) : mixed
Retrieve an item from the cache by key.
Parameters
- $key string|array
many ( array $keys ) : array
Retrieve multiple items from the cache by key.
Parameters
- $keys array
put ( $key , $value , $seconds ) : bool
Store an item in the cache for a given number of seconds.
Parameters
- $key string
- $value mixed
- $seconds int
putMany ( array $values , $seconds ) : bool
Store multiple items in the cache for a given number of seconds.
Parameters
- $values array
- $seconds int
add ( $key , $value , $seconds ) : bool
Store an item in the cache if the key doesn't exist.
Parameters
- $key string
- $value mixed
- $seconds int
increment ( $key , $value ) : int
Increment the value of an item in the cache.
Parameters
- $key string
- $value mixed
decrement ( $key , $value ) : int
Decrement the value of an item in the cache.
Parameters
- $key string
- $value mixed
forever ( $key , $value ) : bool
Store an item in the cache indefinitely.
Parameters
- $key string
- $value mixed
lock ( $name , $seconds , $owner ) : Lock
Get a lock instance.
Parameters
- $name string
- $seconds int
- $owner string|null
restoreLock ( $name , $owner ) : Lock
Restore a lock instance using the owner identifier.
Parameters
- $name string
- $owner string
forget ( $key ) : bool
Remove an item from the cache.
Parameters
- $key string
flush ( ) : bool
Remove all items from the cache.
flushStaleTags ( ) : void
Remove all expired tag set entries.
tags ( $names ) : RedisTaggedCache
Begin executing a new tags operation.
Parameters
- $names array|mixed
currentTags ( $chunkSize ) : Illuminate\...\LazyCollection
Get a collection of all of the cache tags currently being used.
Parameters
- $chunkSize int
lockConnection ( ) : Connection
Get the Redis connection instance that should be used to manage locks.
setConnection ( $connection ) : void
Specify the name of the connection that should be used to store data.
Parameters
- $connection string
setLockConnection ( $connection ) : $this
Specify the name of the connection that should be used to manage locks.
Parameters
- $connection string
getPrefix ( ) : string
Get the cache key prefix.
setPrefix ( $prefix ) : void
Set the cache key prefix.
Parameters
- $prefix string
serialize ( $value ) : mixed
Serialize the value.
Parameters
- $value mixed
unserialize ( $value ) : mixed
Unserialize the value.
Parameters
- $value mixed