PHP Class CI_Cache_memcached, TastyIgniter

Author: EllisLab Dev Team
Inheritance: extends CI_Driver
Afficher le fichier Open project: tastyigniter/tastyigniter

Protected Properties

Свойство Type Description
$_config array Memcached configuration
$_memcached object Holds the memcached object

Méthodes publiques

Méthode Description
__construct ( ) : void Class constructor
__destruct ( ) : void Class destructor
cache_info ( ) : mixed Cache Info
clean ( ) : boolean Clean the Cache
decrement ( string $id, integer $offset = 1 ) : mixed Decrement a raw value
delete ( mixed $id ) : boolean Delete from Cache
get ( string $id ) : mixed Fetch from cache
get_metadata ( mixed $id ) : mixed Get Cache Metadata
increment ( string $id, integer $offset = 1 ) : mixed Increment a raw value
is_supported ( ) : boolean Is supported
save ( string $id, mixed $data, integer $ttl = 60, boolean $raw = FALSE ) : boolean Save

Method Details

__construct() public méthode

Setup Memcache(d)
public __construct ( ) : void
Résultat void

__destruct() public méthode

Closes the connection to Memcache(d) if present.
public __destruct ( ) : void
Résultat void

cache_info() public méthode

Cache Info
public cache_info ( ) : mixed
Résultat mixed array on success, false on failure

clean() public méthode

Clean the Cache
public clean ( ) : boolean
Résultat boolean false on failure/true on success

decrement() public méthode

Decrement a raw value
public decrement ( string $id, integer $offset = 1 ) : mixed
$id string Cache ID
$offset integer Step/value to reduce by
Résultat mixed New value on success or FALSE on failure

delete() public méthode

Delete from Cache
public delete ( mixed $id ) : boolean
$id mixed key to be deleted.
Résultat boolean true on success, false on failure

get() public méthode

Fetch from cache
public get ( string $id ) : mixed
$id string Cache ID
Résultat mixed Data on success, FALSE on failure

get_metadata() public méthode

Get Cache Metadata
public get_metadata ( mixed $id ) : mixed
$id mixed key to get cache metadata on
Résultat mixed FALSE on failure, array on success.

increment() public méthode

Increment a raw value
public increment ( string $id, integer $offset = 1 ) : mixed
$id string Cache ID
$offset integer Step/value to add
Résultat mixed New value on success or FALSE on failure

is_supported() public méthode

Returns FALSE if memcached is not supported on the system. If it is, we setup the memcached object & return TRUE
public is_supported ( ) : boolean
Résultat boolean

save() public méthode

Save
public save ( string $id, mixed $data, integer $ttl = 60, boolean $raw = FALSE ) : boolean
$id string Cache ID
$data mixed Data being cached
$ttl integer Time to live
$raw boolean Whether to store the raw value
Résultat boolean TRUE on success, FALSE on failure

Property Details

$_config protected_oe property

Memcached configuration
protected array $_config
Résultat array

$_memcached protected_oe property

Holds the memcached object
protected object $_memcached
Résultat object