- Symphony 2.7.5
-
› assets
14 -
› boot
15 -
› core
24 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
61 -
› interface
9 -
› toolkit
60 - Delegates101
- Deprecated28
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 class Cacheable
class.cacheable.php #14The Cacheable class provides a wrapper around an iCache
interface
and provides basic CRUD functionality for caching. Historically,
this class was hardcoded to use MySQL, but since Symphony 2.4 this
may not be the case anymore.
Methods
void __construct(iCache $cacheProvider)
The constructor for the Cacheable takes an instance of the
a class that extends the iCache
interface. Symphony::Database()
is accepted a valid $cacheProvider
to maintain backwards compatibility.
Parameters
mixed check(
$hash)
Parameters
Deprecated
This function will be removed in Symphony 3.0. Use read()
instead.
boolean clean()
Deprecated
This function will be removed in Symphony 3.0. Use delete()
instead.
static string|boolean compressData(
$data)
Given some data, this function will compress it using gzcompress
and then the result is run through base64_encode
If this fails,
false is returned otherwise the compressed data
Parameters
Returns
The compressed data, or false if an error occurred
static string|boolean decompressData(
$data)
Given compressed data, this function will decompress it and return the output.
Parameters
Returns
The decompressed data, or false if an error occurred
boolean delete(
$hash, $namespace)
Given the hash, this function will remove it from the cache.
Parameters
boolean forceExpiry(
$hash)
Parameters
Deprecated
This function will be removed in Symphony 3.0. Use delete()
instead.
string getType()
Returns the type of the internal caching provider
mixed read(
$hash, $namespace)
Given the hash of a some data, check to see whether it exists the cache.
Parameters
boolean write(
$hash, $data, $ttl, $namespace)
A wrapper for writing data in the cache.
Parameters
Returns
If an error occurs, this function will return false otherwise true