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( mixed $namespace, mixed $key )
get a value from the specified namespace / key
get a value from the specified namespace / key
Parameters
- $namespace
mixed $namespace
- $key
mixed $key
|
public
|
#
set( mixed $namespace, mixed $key, mixed $value, mixed $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
mixed $namespace
- $key
mixed $key
- $value
mixed $value
- $expiry
mixed $expiry
|
public
|
#
delete( mixed $namespace, mixed $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
- $namespace
mixed $namespace
- $key
mixed $key
|
public
|
|
public
|
#
acquireLock( mixed $something, mixed $wait_for = 5 )
Acquire a lock on something
Acquire a lock on something
|
public
|
|