class vB_Memcached extends vB_Memcache

This implements an object wrapper for Memcached

Traits

Properties

static protected vB_Memcached $instance A reference to the singleton instance from vB_Memcache
protected array $config Contains the config variables loaded from the config file from vB_Memcache
protected $memcached The Memcache object (can be either Memcache or Memcached) from vB_Memcache
protected $defaultExpiration from vB_Memcache
protected boolean $memcached_connected To verify a connection is still active from vB_Memcache

Methods

__sleep()

No description

__wakeup()

No description

__construct()

No description

static 
instance()

No description

setConfig($config)

No description

addServers()

No description

integer
connect()

Connect Wrapper for Memcache

bool
add($key, $value, $expiration = NULL)

Add an item under a new key

bool
set(string $key, mixed $value, c $expiration = NULL)

Store an item

mixed
get(mixed $keys)

Retrieve an item

bool
delete(string $key)

Delete an item

bool
flush()

Invalidate all items in the cache

Bool
close()

Close any memcache open connections

Details

in vB_Trait_NoSerialize at line 15
__sleep()

in vB_Trait_NoSerialize at line 20
__wakeup()

at line 23
protected __construct()

in vB_Memcache at line 57
static instance()

in vB_Memcache at line 80
setConfig($config)

Parameters

$config

at line 29
protected addServers()

in vB_Memcache at line 132
integer connect()

Connect Wrapper for Memcache

Return Value

integer When a new connection is made 1 is returned, 2 if a connection already existed, 3 if problems on adding server

at line 61
bool add($key, $value, $expiration = NULL)

Add an item under a new key

Parameters

$key
$value
$expiration

Return Value

bool

at line 76
bool set(string $key, mixed $value, c $expiration = NULL)

Store an item

Parameters

string $key
mixed $value
c $expiration

Return Value

bool

at line 121
mixed get(mixed $keys)

Retrieve an item

Parameters

mixed $keys string or array of strings

Return Value

mixed

in vB_Memcache at line 213
bool delete(string $key)

Delete an item

Parameters

string $key

Return Value

bool

in vB_Memcache at line 234
bool flush()

Invalidate all items in the cache

Return Value

bool

at line 96
Bool close()

Close any memcache open connections

Return Value

Bool Whether closing connection was success or failure.