get()
get(string $key) : mixed
Returns the data stored under the specified key.
Parameters
| string | $key | The key under which the data is stored |
Returns
mixed —The data stored under the specified key.
Specifies the interface for a cache.
Implementors have to make sure, that the cache doesn't get corrupted by concurrent calls to the get and put methods. It is recommended to periodically invalidate the data in the cache, to ensure that data that is referenced by an entity gets refeshed.
get(string $key) : mixed
Returns the data stored under the specified key.
| string | $key | The key under which the data is stored |
The data stored under the specified key.
put(string $key, mixed $data)
Stores the data under the specified key
| string | $key | The key under which to store the data |
| mixed | $data | The data to store |