Inherited by Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.
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 () | |
PRONTO WEB FRAMEWORK Copyright (C) 2006, Judd Vinet
Description: Base class for cache adapters
Definition at line 10 of file cache.php.
| Cache::Cache | ( | ) |
Constructor
Definition at line 15 of file cache.php.
Referenced by Cache_APC::Cache_APC(), Cache_eAccelerator::Cache_eAccelerator(), Cache_File::Cache_File(), Cache_MemCache::Cache_MemCache(), Cache_SHM::Cache_SHM(), and Cache_XCache::Cache_XCache().
| Cache::delete | ( | $ | key | ) |
Reimplemented in Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.
| Cache::flush | ( | ) |
Flush entire cache.
Reimplemented in Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.
| Cache::gc | ( | ) |
Expire old entries.
Reimplemented in Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.
| & Cache::get | ( | $ | key | ) |
Reimplemented in Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.
| 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.
| string | $key | |
| string | $default The PHP code to evaluate (no trailing semicolon) |
| Cache::get_or_set | ( | $ | key, | |
| $ | default = null | |||
| ) |
| Cache::set | ( | $ | key, | |
| $ | var, | |||
| $ | expire = 0 | |||
| ) |
| 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.
| Cache::stats | ( | ) |
Return some usage statistics.
Reimplemented in Cache_APC, Cache_eAccelerator, Cache_File, Cache_MemCache, Cache_SHM, and Cache_XCache.
1.6.1