PHP Class Phergie_Plugin_Cache, phergie

Inheritance: extends Phergie_Plugin_Abstract
Afficher le fichier Open project: phergie/phergie Class Usage Examples

Protected Properties

Свойство Type Description
$cache array Key-value data storage for the cache

Méthodes publiques

Méthode Description
expire ( string $key ) : boolean Expires a value that has exceeded its time to live.
fetch ( string $key ) : mixed Fetches a previously stored value.
store ( string $key, mixed $data, integer | null $ttl = 3600, boolean $overwrite = true ) : boolean Stores a value in the cache.

Method Details

expire() public méthode

Expires a value that has exceeded its time to live.
public expire ( string $key ) : boolean
$key string Key associated with the value to expire
Résultat boolean

fetch() public méthode

Fetches a previously stored value.
public fetch ( string $key ) : mixed
$key string Key associated with the value
Résultat mixed Stored value or FALSE if no value or an expired value is associated with the specified key

store() public méthode

Stores a value in the cache.
public store ( string $key, mixed $data, integer | null $ttl = 3600, boolean $overwrite = true ) : boolean
$key string Key to associate with the value
$data mixed Data to be stored
$ttl integer | null Time to live in seconds or NULL for forever
$overwrite boolean TRUE to overwrite any existing value associated with the specified key
Résultat boolean

Property Details

$cache protected_oe property

Key-value data storage for the cache
protected array $cache
Résultat array