This class represents an array in cache and removes the neccessity to encode/decode and store the data after every change.
- Author
- Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL2 or any later version
- Since
- Stud.IP 5.0
Constructs the cached array
- Parameters
-
string | $key | Cache key where the array is/should be stored an int which will be length of the substring of the given chache offset or a callable which will return the partition key. |
int | $duration | Duration in seconds for which the item shall be stored |
Removes all values from the cache.
loadData |
( |
string |
$offset | ) |
|
|
protected |
Loads the data from cache.
- Parameters
-
string | $offset | Offset to load |
Determines whether an offset exists in the array.
- Parameters
-
- Returns
- bool
Returns the value at given offset or null if it doesn't exist.
- Parameters
-
- Returns
- mixed
offsetSet |
( |
|
$offset, |
|
|
|
$value |
|
) |
| |
Sets the value for a given offset.
- Parameters
-
string | $offset | Offset |
mixed | $value | Value |
Unsets the value at a given offset
- Parameters
-
Clears cached values from memory, but does not remove them from the cache.
storeData |
( |
string |
$offset | ) |
|
|
protected |
Stores the data back to the cache. Data needs to be wrapped in another array so that we can correctly read back a value of "false".
- Parameters
-
string | $offset | Offset to store |
The documentation for this class was generated from the following file: