List of all members.
Static Public Member Functions |
| static | __static () |
| static | has ($name) |
| static | has_group ($group) |
| static | get ($name) |
| static | get_group ($group) |
| static | set ($name, $value, $expiry=3600, $keep=false) |
| static | expire ($name, $match_mode= 'strict') |
| static | expired ($name) |
| static | extend ($name, $expiry) |
|
static | debug () |
| static | purge () |
Protected Member Functions |
| | _has ($name, $group) |
| | _has_group ($group) |
| | _get ($name, $group) |
| | _get_group ($group) |
| | _set ($name, $value, $expiry, $group, $keep) |
| | _expire ($name, $group) |
| | _expired ($name, $group) |
| | _extend ($name, $expiry, $group) |
Static Protected Attributes |
|
static | $default_group = 'default' |
|
static | $instance |
Detailed Description
Habari Cache Class
Base abstract class for caching computationally expensive or bandwidth intensive data
Definition at line 12 of file cache.php.
Member Function Documentation
| static Cache::__static |
( |
|
) |
[static] |
Set up the static cache instance in __autoload()
Definition at line 20 of file cache.php.
| Cache::_expire |
( |
$ |
name, |
|
|
$ |
group | |
|
) |
| | [abstract, protected] |
A cache instance implements this to expire the named value from the cache.
- Parameters:
-
| string | $name The name of the cached item |
| Cache::_expired |
( |
$ |
name, |
|
|
$ |
group | |
|
) |
| | [abstract, protected] |
A cache instance implements this to expire the named value from the cache.
- Parameters:
-
| string | $name The name of the cached item |
Reimplemented in APCCache, and FileCache.
| Cache::_extend |
( |
$ |
name, |
|
|
$ |
expiry, |
|
|
$ |
group | |
|
) |
| | [abstract, protected] |
A cache instance implements this to extend the expiration of the named cached value.
- Parameters:
-
| string | $name The name of the cached item |
| integer | $expiry The duration in seconds to extend the cache expiration by |
Reimplemented in APCCache, and FileCache.
| Cache::_get |
( |
$ |
name, |
|
|
$ |
group | |
|
) |
| | [abstract, protected] |
A cache instance implements this to return the named value from the cache.
- Parameters:
-
| string | $name The name of the cached item |
- Returns:
- mixed The item value or null if it doesn't exist in cache
Reimplemented in APCCache, and FileCache.
| Cache::_get_group |
( |
$ |
group |
) |
[abstract, protected] |
A cache instance implements this to return the group from the cache.
- Parameters:
-
| string | $name The name of the cached group |
- Returns:
- mixed The item value or null if it doesn't exist in cache
Reimplemented in APCCache, and FileCache.
| Cache::_has |
( |
$ |
name, |
|
|
$ |
group | |
|
) |
| | [abstract, protected] |
A cache instance implements this function to return whether a named cache exists.
- Parameters:
-
| string | $name The name of the cached item |
- Returns:
- boolean true if the item is cached, false if not
Reimplemented in APCCache, and FileCache.
| Cache::_has_group |
( |
$ |
group |
) |
[abstract, protected] |
A cache instance implements this function to return whether a group exists.
- Parameters:
-
| string | $name The name of the cached group |
- Returns:
- boolean true if the group is cached, false if not
Reimplemented in APCCache, and FileCache.
| Cache::_set |
( |
$ |
name, |
|
|
$ |
value, |
|
|
$ |
expiry, |
|
|
$ |
group, |
|
|
$ |
keep | |
|
) |
| | [abstract, protected] |
A cache instance implements this to set the named value in the cache with an expiration.
- Parameters:
-
| string | $name The name of the cached item |
| mixed | $value The value to store |
| integer | $expiry Number of second after the call that the cache will expire |
Reimplemented in APCCache, and FileCache.
| static Cache::expire |
( |
$ |
name, |
|
|
$ |
match_mode = 'strict' | |
|
) |
| | [static] |
Expires the named value from the cache.
- Parameters:
-
| mixed | $name The name of the cached item or an array of array( string $group, string $name ) |
| string | $match_mode (optional) how to match item names ('strict', 'regex', 'glob') (default 'strict') |
Definition at line 157 of file cache.php.
| static Cache::expired |
( |
$ |
name |
) |
[static] |
Check if a named value in the cache has expired.
- Parameters:
-
| mixed | $name The name of the cached item or an array of array( string $group, string $name ) |
Definition at line 181 of file cache.php.
| static Cache::extend |
( |
$ |
name, |
|
|
$ |
expiry | |
|
) |
| | [static] |
Extend the expiration of the named cached value.
- Parameters:
-
| mixed | $name The name of the cached item or an array of array( string $group, string $name ) |
| integer | $expiry The duration in seconds to extend the cache expiration by |
Definition at line 206 of file cache.php.
| static Cache::get |
( |
$ |
name |
) |
[static] |
| static Cache::get_group |
( |
$ |
group |
) |
[static] |
Returns the group from the cache.
- Parameters:
-
| string | $name The name of the cached group |
- Returns:
- mixed The item value or null if it doesn't exist in cache
Definition at line 107 of file cache.php.
| static Cache::has |
( |
$ |
name |
) |
[static] |
| static Cache::has_group |
( |
$ |
group |
) |
[static] |
Is group in the cache?
- Parameters:
-
| string | $group name of the cached group |
- Returns:
- boolean true if group is cached, false if not
Definition at line 62 of file cache.php.
| static Cache::purge |
( |
|
) |
[static] |
| static Cache::set |
( |
$ |
name, |
|
|
$ |
value, |
|
|
$ |
expiry = 3600, |
|
|
$ |
keep = false | |
|
) |
| | [static] |
Set the named value in the cache with an expiration.
- Parameters:
-
| mixed | $name The name of the cached item or an array of array( string $group, string $name ) |
| mixed | $value The value to store |
| integer | $expiry Number of second after the call that the cache will expire |
| boolean | $keep If true, retain the cache value even after expiry but report the cache as expired |
Definition at line 129 of file cache.php.
Referenced by AtomHandler::act_introspection(), AtomHandler::act_rsd(), and ViddlerSilo::silo_dir().
The documentation for this class was generated from the following file: