CacheProviderInterface
in
An interface that contains the methods for a cache implementation for storing business objects and other less complex values.
Tags
Table of Contents
Methods
- check() : bool
- Check the cache for the existance of the given $key. Returns true if the $key is set, false otherwise.
- delete() : void
- Attempt to delete the value from the cache for the given $key.
- get() : mixed
- Attempt to get the value from the cache for the given $key.
- set() : void
- Attempt to set the value in the cache for the given $key. Old values on the same key will be overwritten.
Methods
check()
Check the cache for the existance of the given $key. Returns true if the $key is set, false otherwise.
public
check( $key) : bool
Parameters
Tags
Return values
booldelete()
Attempt to delete the value from the cache for the given $key.
public
delete( $key) : void
Parameters
Tags
get()
Attempt to get the value from the cache for the given $key.
public
get( $key) : mixed
Parameters
Tags
set()
Attempt to set the value in the cache for the given $key. Old values on the same key will be overwritten.
public
set( $key, $value[, $expiry = 0 ]) : void
Parameters
- $key :
- $value :
- $expiry : = 0
-
Optional, some cache implementations will support an expiry value in seconds.