class
Illuminate
/
Cache
/
ArrayStore
ArrayStore
Extends
Implements
Uses
Properties
protected
$storage array
The array of stored values.
Default: []
public
$locks array
The array of locks.
Default: []
protected
$serializesValues bool
Indicates if values are serialized within the store.
Default: null
Methods
public
__construct ( $serializesValues ) : void
Create a new Array store.
Parameters
- $serializesValues bool
public
get ( $key ) : mixed
Retrieve an item from the cache by key.
Parameters
- $key string|array
public
put ( $key , $value , $seconds ) : bool
Store an item in the cache for a given number of seconds.
Parameters
- $key string
- $value mixed
- $seconds int
public
increment ( $key , $value ) : int
Increment the value of an item in the cache.
Parameters
- $key string
- $value mixed
public
decrement ( $key , $value ) : int
Decrement the value of an item in the cache.
Parameters
- $key string
- $value mixed
public
forever ( $key , $value ) : bool
Store an item in the cache indefinitely.
Parameters
- $key string
- $value mixed
public
forget ( $key ) : bool
Remove an item from the cache.
Parameters
- $key string
public
flush ( ) : bool
Remove all items from the cache.
public
getPrefix ( ) : string
Get the cache key prefix.
protected
calculateExpiration ( $seconds ) : int
Get the expiration time of the key.
Parameters
- $seconds int
protected
toTimestamp ( $seconds ) : int
Get the UNIX timestamp for the given number of seconds.
Parameters
- $seconds int
public
lock ( $name , $seconds , $owner ) : Lock
Get a lock instance.
Parameters
- $name string
- $seconds int
- $owner string|null
public
restoreLock ( $name , $owner ) : Lock
Restore a lock instance using the owner identifier.
Parameters
- $name string
- $owner string