Cache Class Reference

Inherited by Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.

List of all members.

Public Member Functions

 Cache ()
 set ($key, $var, $expire=0)
get ($key)
 get_or_set ($key, $default=null)
 get_or_eval ($key, $default='null')
 delete ($key)
 flush ()
 gc ()
 stats ()

Detailed Description

PRONTO WEB FRAMEWORK Copyright (C) 2006, Judd Vinet

Author:
Judd Vinet <jvinet@zeroflux.org>

Description: Base class for cache adapters

Definition at line 10 of file cache.php.


Member Function Documentation

Cache::Cache (  ) 
Cache::delete ( key  ) 

Reimplemented in Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.

Definition at line 70 of file cache.php.

Cache::flush (  ) 

Flush entire cache.

Reimplemented in Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.

Definition at line 77 of file cache.php.

Cache::gc (  ) 

Expire old entries.

Reimplemented in Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.

Definition at line 84 of file cache.php.

& Cache::get ( key  ) 

Reimplemented in Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.

Definition at line 28 of file cache.php.

Cache::get_or_eval ( key,
default = 'null' 
)

Return a value from the cache. If the value doesn't exist in the cache, create a lambda function that returns the value of the evaluated code in $default, and set/return that value.

Parameters:
string $key
string $default The PHP code to evaluate (no trailing semicolon)

Definition at line 59 of file cache.php.

Cache::get_or_set ( key,
default = null 
)

Return a value from the cache. If the value doesn't exist in the cache, set it to the value of $default and return that.

Parameters:
string $key
mixed $default

Definition at line 41 of file cache.php.

Cache::set ( key,
var,
expire = 0 
)
Parameters:
string $key Unique key name to store value under
mixed $var Variable to store
int $expire Expiration time (from now) in seconds. Use zero to never expire.

Reimplemented in Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.

Definition at line 24 of file cache.php.

Cache::stats (  ) 

Return some usage statistics.

Reimplemented in Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.

Definition at line 91 of file cache.php.


The documentation for this class was generated from the following file:

Generated on Wed Jan 13 09:21:02 2010 for Pronto Framework by  doxygen 1.6.1