[ Index ] |
|
Code source de PHP PEAR 1.4.5 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 455 lignes (14 kb) |
Inclus ou requis: | 7 fois |
Référencé: | 0 fois |
Nécessite: | 1 fichier Cache/Error.php |
Cache_Container:: (16 méthodes):
load()
getUserdata()
isExpired()
isCached()
fetch()
save()
remove()
flush()
idExists()
garbageCollection()
preload()
flushPreload()
setOptions()
encode()
decode()
getExpiresAbsolute()
Classe: Cache_Container - X-Ref
Common base class of all cache storage container.load($id, $group) X-Ref |
Loads a dataset from the cache. param: string dataset ID param: string cache group return: mixed dataset value or NULL on failure |
getUserdata($id, $group) X-Ref |
Returns the userdata field of a cached data set. param: string dataset ID param: string cache group return: string userdata |
isExpired($id, $group, $max_age) X-Ref |
Checks if a dataset is expired. param: string dataset ID param: string cache group param: integer maximum age timestamp return: boolean |
isCached($id, $group) X-Ref |
Checks if a dataset is cached. param: string dataset ID param: string cache group return: boolean |
fetch($id, $group) X-Ref |
Fetches a dataset from the storage medium. param: string dataset ID param: string cache group return: array format: [expire date, cached data, user data] |
save($id, $data, $expire, $group, $userdata) X-Ref |
Stores a dataset. param: string dataset ID param: mixed data to store param: mixed userdefined expire date param: string cache group param: string additional userdefined data return: boolean |
remove($id, $group) X-Ref |
Removes a dataset. param: string dataset ID param: string cache group return: boolean |
flush($group) X-Ref |
Flushes the cache - removes all caches datasets from the cache. param: string If a cache group is given only the group will be flushed return: integer Number of removed datasets, -1 on failure |
idExists($id, $group) X-Ref |
Checks if a dataset exists. param: string dataset ID param: string cache group return: boolean |
garbageCollection() X-Ref |
Starts the garbage collection. |
preload($id, $group) X-Ref |
Does a speculative preload of a dataset param: string dataset ID param: string cache group return: boolean |
flushPreload($id = '', $group = 'default') X-Ref |
Flushes the internal preload buffer. save(), remove() and flush() must call this method to preevent differences between the preloaded values and the real cache contents. param: string dataset ID, if left out the preloaded values will be flushed. param: string cache group |
setOptions($requested, $allowed) X-Ref |
Imports the requested datafields as object variables if allowed param: array List of fields to be imported as object variables param: array List of allowed datafields |
encode($data) X-Ref |
Encodes the data for the storage container. |
decode($data) X-Ref |
Decodes the data from the storage container. |
getExpiresAbsolute($expires) X-Ref |
Translates human readable/relative times in unixtime param: mixed can be in the following formats: return: integer unix timestamp |
Généré le : Sun Feb 25 14:08:00 2007 | par Balluche grâce à PHPXref 0.7 |