Class AwlCache
A simple Memcached wrapper supporting namespacing of stored values.
Methods summary
public
|
#
__construct( )
Initialise the cache connection. We use getpid() to give us a persistent connection.
Initialise the cache connection. We use getpid() to give us a persistent connection.
|
public
|
#
isActive( )
So we can find out if we are actually using the cache.
So we can find out if we are actually using the cache.
|
public
|
#
get( $namespace, $key )
get a value from the specified namespace / key
get a value from the specified namespace / key
Parameters
|
public
|
#
set( $namespace, $key, $value, $expiry = 864000 )
Set a value for the specified namespace/key, perhaps with an expiry (default 10 days)
Set a value for the specified namespace/key, perhaps with an expiry (default 10 days)
Parameters
- $namespace
- $key
- $value
- $expiry
|
public
|
#
delete( $namespace, $key )
Delete a value from a namespace/key, or for everything in a namespace if a 'null' key is supplied.
Delete a value from a namespace/key, or for everything in a namespace if a 'null' key is supplied.
Parameters
|
public
|
|
public
|
#
acquireLock( $something, $wait_for = 5 )
Acquire a lock on something
Acquire a lock on something
|
public
|
|