◆ __construct()
◆ clear()
Delete all keys from the cache
- Paramètres
-
boolean | $check | if true will check expiration, otherwise delete all |
string | $config | name of the configuration to use |
- Renvoie
- boolean True if the cache was successfully cleared, false otherwise @access public
◆ config()
config |
( |
|
$name = 'default' , |
|
|
|
$settings = array() |
|
) |
| |
Set the cache configuration to use
- Paramètres
-
string | array | $name | Name of the configuration |
array | $settings | Optional associative array of settings passed to the engine |
- Renvoie
- array (engine, settings) on success, false on failure @access public
◆ delete()
static delete |
( |
|
$key, |
|
|
|
$config = null |
|
) |
| |
|
static |
Delete a key from the cache
- Paramètres
-
string | $key | Identifier for the data |
string | $config | name of the configuration to use |
- Renvoie
- boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed @access public
◆ engine()
engine |
( |
|
$name = 'file' , |
|
|
|
$settings = array() |
|
) |
| |
Set the cache engine to use or modify settings for one instance
- Paramètres
-
string | $name | Name of the engine (without 'Engine') |
array | $settings | Optional associative array of settings passed to the engine |
- Renvoie
- boolean True on success, false on failure @access public
◆ gc()
Garbage collection
Permanently remove all expired and deleted data
@access public
◆ getInstance()
Returns a singleton instance
- Renvoie
- object @access public
◆ isInitialized()
isInitialized |
( |
|
$engine = null | ) |
|
Check if Cache has initialized a working storage engine
- Paramètres
-
string | $engine | Name of the engine |
- Renvoie
- bool
◆ key()
generates a safe key
- Paramètres
-
string | $key | the key passed over |
- Renvoie
- mixed string $key or false @access private
◆ loadEngine()
Tries to find and include a file for a cache engine and returns object instance
- Paramètres
-
string | $name | Name of the engine |
- Renvoie
- mixed $engine object or null @access private
◆ read()
static read |
( |
|
$key, |
|
|
|
$config = null |
|
) |
| |
|
static |
Read a key from the cache
- Paramètres
-
string | $key | Identifier for the data |
string | array | $config | name of the configuration to use |
- Renvoie
- mixed The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it @access public
◆ settings()
settings |
( |
|
$engine = null | ) |
|
Return the settings for current cache engine
- Paramètres
-
string | $engine | Name of the engine |
- Renvoie
- array list of settings for this engine @access public
◆ write()
static write |
( |
|
$key, |
|
|
|
$value, |
|
|
|
$duration = null |
|
) |
| |
|
static |
Write data for key into cache
- Paramètres
-
string | $key | Identifier for the data |
mixed | $value | Data to be cached - anything except a resource |
mixed | $duration | Optional - string configuration name OR how long to cache the data, either in seconds or a string that can be parsed by the strtotime() function OR array('config' => 'default', 'duration' => '3600') |
- Renvoie
- boolean True if the data was successfully cached, false on failure @access public
◆ $configs
◆ $engine
◆ $name
La documentation de cette classe a été générée à partir du fichier suivant :