|
Andrew's Web Libraries (AWL) 0.64
|
Public Member Functions | |
| __construct () | |
| isActive () | |
| get ( $namespace, $key) | |
| set ( $namespace, $key, $value, $expiry=864000) | |
| delete ( $namespace, $key) | |
| flush () | |
| acquireLock ( $something, $wait_for=5) | |
| releaseLock ( $something) | |
Private Member Functions | |
| nskey ( $namespace, $key) | |
Static Private Attributes | |
| static | $m |
| static | $servers |
| static | $working |
A simple Memcached wrapper supporting namespacing of stored values.
Definition at line 10 of file AwlCache.php.
| AwlCache::__construct | ( | ) |
Initialise the cache connection. We use getpid() to give us a persistent connection.
Definition at line 18 of file AwlCache.php.
| AwlCache::acquireLock | ( | $something, | |
| $wait_for = 5 ) |
Acquire a lock on something
Definition at line 189 of file AwlCache.php.
| AwlCache::delete | ( | $namespace, | |
| $key ) |
Delete a value from a namespace/key, or for everything in a namespace if a 'null' key is supplied.
| $namespace | |
| $key |
Definition at line 149 of file AwlCache.php.
| AwlCache::flush | ( | ) |
Flush the entire cache
Definition at line 179 of file AwlCache.php.
| AwlCache::get | ( | $namespace, | |
| $key ) |
get a value from the specified namespace / key
| $namespace | |
| $key |
Definition at line 75 of file AwlCache.php.
| AwlCache::isActive | ( | ) |
So we can find out if we are actually using the cache.
Definition at line 57 of file AwlCache.php.
|
private |
Construct a string from the namespace & key
| unknown_type | $namespace | |
| unknown_type | $key |
Definition at line 66 of file AwlCache.php.
| AwlCache::releaseLock | ( | $something | ) |
Release a lock
Definition at line 202 of file AwlCache.php.
| AwlCache::set | ( | $namespace, | |
| $key, | |||
| $value, | |||
| $expiry = 864000 ) |
Set a value for the specified namespace/key, perhaps with an expiry (default 10 days)
| $namespace | |
| $key | |
| $value | |
| $expiry |
Definition at line 91 of file AwlCache.php.
|
staticprivate |
Definition at line 11 of file AwlCache.php.
|
staticprivate |
Definition at line 12 of file AwlCache.php.
|
staticprivate |
Definition at line 13 of file AwlCache.php.