[ Index ] |
|
Code source de PHP PEAR 1.4.5 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 356 lignes (11 kb) |
Inclus ou requis: | 5 fois |
Référencé: | 0 fois |
Nécessite: | 2 fichiers Cache/Error.php PEAR.php |
Cache:: (15 méthodes):
Cache()
_Cache()
getCaching()
setCaching()
get()
save()
extSave()
load()
getUserdata()
remove()
flush()
isCached()
isExpired()
generateID()
garbageCollection()
Cache($container, $container_options = '') X-Ref |
param: string Name of container class param: array Array with container class options |
_Cache() X-Ref |
Pas de description |
getCaching() X-Ref |
Returns the current caching state. return: boolean The current caching state. |
setCaching($state) X-Ref |
Enables or disables caching. param: boolean The new caching state. |
get($id, $group = 'default') X-Ref |
Returns the requested dataset it if exists and is not expired param: string dataset ID param: string cache group return: mixed cached data or NULL on failure |
save($id, $data, $expires = 0, $group = 'default') X-Ref |
Stores the given data in the cache. param: string dataset ID used as cache identifier param: mixed data to cache param: integer lifetime of the cached data in seconds - 0 for endless param: string cache group return: boolean |
extSave($id, $cachedata, $userdata, $expires = 0, $group = 'default') X-Ref |
Stores a dataset with additional userdefined data. param: string dataset ID param: mixed data to store param: string additional userdefined data param: mixed userdefined expire date param: string cache group return: boolean |
load($id, $group = 'default') X-Ref |
Loads the given ID from the cache. param: string dataset ID param: string cache group return: mixed cached data or NULL on failure |
getUserdata($id, $group = 'default') X-Ref |
Returns the userdata field of a cached data set. param: string dataset ID param: string cache group return: string userdata |
remove($id, $group = 'default') X-Ref |
Removes the specified dataset from the cache. param: string dataset ID param: string cache group return: boolean |
flush($group = 'default') X-Ref |
Flushes the cache - removes all data from it param: string cache group, if empty all groups will be flashed return: integer number of removed datasets |
isCached($id, $group = 'default') X-Ref |
Checks if a dataset exists. Note: this does not say that the cached data is not expired! param: string dataset ID param: string cache group return: boolean |
isExpired($id, $group = 'default', $max_age = 0) X-Ref |
Checks if a dataset is expired param: string dataset ID param: string cache group param: integer maximum age for the cached data in seconds - 0 for endless return: boolean |
generateID($variable) X-Ref |
Generates a "unique" ID for the given value This is a quick but dirty hack to get a "unique" ID for a any kind of variable. ID clashes might occur from time to time although they are extreme unlikely! param: mixed variable to generate a ID for return: string "unique" ID |
garbageCollection($force = false) X-Ref |
Calls the garbage collector of the storage object with a certain probability param: boolean Force a garbage collection run? |
Généré le : Sun Feb 25 14:08:00 2007 | par Balluche grâce à PHPXref 0.7 |