| [ Index ] |
PHP Cross Reference of Akelos Framework |
[Source view] [Print]
(no description)
| Author: | Bermi Ferrer |
| Copyright: | Copyright (c) 2002-2006, Akelos Media, S.L. http://www.akelos.org |
| License: | GNU Lesser General Public License |
| File Size: | 344 lines (12 kb) |
| Included or required: | 3 times |
| Referenced: | 0 times |
| Includes or requires: | 4 files AkCache/AkMemcache.php AkObject.php Ak.php AkCache/AkAdodbCache.php |
AkCache:: (7 methods):
lookupStore()
expandCacheKey()
init()
get()
save()
remove()
clean()
| lookupStore($options = null) X-Ref |
| Instantiates and configures the AkCache store. If $options == NULL the configuration will be taken from the constants: AK_CACHE_HANDLER and AK_CACHE_OPTIONS if $options is of type string/int the $options parameter will be considered as the AK_CACHE_HANDLER_* Type (AK_CACHE_HANDLER_PEAR,AK_CACHE_HANDLER_ADODB,AK_CACHE_HANDLER_MEMCACHE) if $options is an array of format: array('file'=>array('cacheDir'=>'/tmp')) or array(AK_CACHE_HANDLER_PEAR=>array('cacheDir'=>'/tmp')) the first key will be used as the AK_CACHE_HANDLER_* Type and the array as the config options Default behaviour is calling the method with the $options == null parameter: AkCache::lookupStore() Calling it with: AkCache::lookupStore(true) will return the configured $cache_store param: mixed $options return: mixed false if no cache could be configured or AkCache instance |
| expandCacheKey($key, $namespace = null) X-Ref |
| No description |
| init($options = null, $cache_type = null) X-Ref |
| Class constructor (ALA Akelos Framework) This method loads an instance of selected driver in order to use it class wide. param: mixed $options You can pass a number specifying the second for param: integer $cache_type The default value is set by defining the constant AK_CACHE_HANDLER in the following line return: void |
| get($id, $group = 'default') X-Ref |
| Test if a cache is available and (if yes) return it param: string $id Cache id param: string $group Name of the cache group. return: mixed Data of the cache (or false if no cache available) |
| save($data, $id = null, $group = 'default') X-Ref |
| Save some data in the cache param: string $data Data to put in cache param: string $id Cache id param: string $group Name of the cache group return: boolean True if no problem |
| remove($id, $group = 'default') X-Ref |
| Remove a cache item param: string $id Cache id param: string $group Name of the cache group return: boolean True if no problem |
| clean($group = false, $mode = 'ingroup') X-Ref |
| Clean the cache If no group is specified all cache items will be destroyed else only cache items of the specified group will be destroyed param: string $group Name of the cache group. param: string $mode Flush cache mode. Options are: return: boolean True if no problem |
| Generated: Mon Oct 27 12:43:49 2008 | Cross-referenced by PHPXref 0.6 |