- Symphony 2.6.1
-
› assets
14 -
› boot
14 -
› core
23 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
61 -
› interface
9 -
› toolkit
60 - Delegates92
- Deprecated24
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public interface iCache
interface.cache.php #12This interface is to be implemented by Extensions who wish to provide cacheable objects for Symphony to use.
Methods
void delete(
$hash)
Given the hash of a cacheable object, remove it from tbl_cache
regardless of if it has expired or not. If no $hash is given,
this removes all cache objects from tbl_cache
that have expired.
After removing, the function uses the __optimise
function
Parameters
See Also
static string getName()
Returns the human readable name of this cache type. This is displayed in the system preferences cache options.
array|boolean read(
$hash)
Given the hash of a some data, check to see whether it exists in
tbl_cache
. If no cached object is found, this function will return
false, otherwise the cached object will be returned as an array.
Parameters
Returns
An associative array of the cached object including the creation time, expiry time, the hash and the data. If the object is not found, false will be returned.
array settings()
This function returns all the settings of the current Cache instance.
Returns
An associative array of settings for this cache where the key is getClass
and the value is an associative array of settings, key being the setting name, value being, the value
boolean write(
$hash, $data, $ttl)
This function will compress data for storage in tbl_cache
.
It is left to the user to define a unique hash for this data so that it can be
retrieved in the future. Optionally, a $ttl
parameter can
be passed for this data. If this is omitted, it data is considered to be valid
forever. This function utilizes the Mutex class to act as a crude locking
mechanism.
Parameters
Returns
If an error occurs, this function will return false otherwise true