Class Cache

Description

Habari Cache Class

Base class for caching computationally expensive or bandwidth intensive data

  • abstract:

Located in /system/classes/cache.php (line 13)


	
			
Direct descendents
Class Description
FileCache Stores cache data in local files
APCCache
Variable Summary
static mixed $default_group
static mixed $instance
Method Summary
static void expire (mixed $name)
static void extend (mixed $name, integer $expiry)
static mixed get (mixed $name)
static mixed get_group ( $group, string $name)
static boolean has (mixed $name)
static boolean has_group (string $group)
static void set (mixed $name, mixed $value, [integer $expiry = 3600])
static void __static ()
void _expire (string $name,  $group)
void _extend (string $name, integer $expiry,  $group)
mixed _get (string $name,  $group)
mixed _get_group ( $group, string $name)
boolean _has (string $name,  $group)
boolean _has_group ( $group, string $name)
void _set (string $name, mixed $value, integer $expiry,  $group)
Variables
static mixed $default_group = 'default' (line 15)
  • access: protected
static mixed $instance (line 16)
  • access: protected
Methods
static method expire (line 156)

Expires the named value from the cache.

  • access: public
static void expire (mixed $name)
  • mixed $name: The name of the cached item or an array of array( string $group, string $name )
static method extend (line 182)

Extend the expiration of the named cached value.

  • access: public
static void extend (mixed $name, integer $expiry)
  • 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
static method get (line 82)

Returns the named value from the cache.

  • return: The item value or NULL if it doesn't exist in cache
  • access: public
static mixed get (mixed $name)
  • mixed $name: The name of the cached item or an array of array( string $group, string $name )
static method get_group (line 108)

Returns the group from the cache.

  • return: The item value or NULL if it doesn't exist in cache
  • access: public
static mixed get_group ( $group, string $name)
  • string $name: The name of the cached group
  • $group
static method has (line 37)

Is record with $name in the cache?

  • return: TRUE if item is cached, FALSE if not
  • access: public
static boolean has (mixed $name)
  • mixed $name: name of the cached item or an array of array( string $group, string $name )
static method has_group (line 63)

Is group in the cache?

  • return: TRUE if group is cached, FALSE if not
  • access: public
static boolean has_group (string $group)
  • string $group: name of the cached group
static method set (line 129)

Set the named value in the cache with an expiration.

  • access: public
static void set (mixed $name, mixed $value, [integer $expiry = 3600])
  • 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
static method __static (line 21)

Set up the static cache instance in __autoload()

  • access: public
static void __static ()
_expire (line 173)

A cache instance implements this to expire the named value from the cache.

  • abstract:
  • access: protected
void _expire (string $name,  $group)
  • string $name: The name of the cached item
  • $group

Redefined in descendants as:
_extend (line 200)

A cache instance implements this to extend the expiration of the named cached value.

  • abstract:
  • access: protected
void _extend (string $name, integer $expiry,  $group)
  • string $name: The name of the cached item
  • integer $expiry: The duration in seconds to extend the cache expiration by
  • $group

Redefined in descendants as:
_get (line 100)

A cache instance implements this to return the named value from the cache.

  • return: The item value or NULL if it doesn't exist in cache
  • abstract:
  • access: protected
mixed _get (string $name,  $group)
  • string $name: The name of the cached item
  • $group

Redefined in descendants as:
_get_group (line 119)

A cache instance implements this to return the group from the cache.

  • return: The item value or NULL if it doesn't exist in cache
  • abstract:
  • access: protected
mixed _get_group ( $group, string $name)
  • string $name: The name of the cached group
  • $group

Redefined in descendants as:
_has (line 55)

A cache instance implements this function to return whether a named cache exists.

  • return: TRUE if the item is cached, FALSE if not
  • abstract:
  • access: protected
boolean _has (string $name,  $group)
  • string $name: The name of the cached item
  • $group

Redefined in descendants as:
_has_group (line 74)

A cache instance implements this function to return whether a group exists.

  • return: TRUE if the group is cached, FALSE if not
  • abstract:
  • access: protected
boolean _has_group ( $group, string $name)
  • string $name: The name of the cached group
  • $group

Redefined in descendants as:
_set (line 148)

A cache instance implements this to set the named value in the cache with an expiration.

  • abstract:
  • access: protected
void _set (string $name, mixed $value, integer $expiry,  $group)
  • 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
  • $group

Redefined in descendants as:

Documentation generated on Thu, 30 Oct 2008 20:31:03 +0100 by phpDocumentor 1.3.2