| [ Index ] |
|
Code source de Plume CMS 1.2.2 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
| Poids: | 331 lignes (9 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
CacheLite:: (11 méthodes):
CacheLite()
get()
save()
remove()
clean()
setLifeTime()
_setFileName()
_read()
_write()
_writeAndControl()
_hash()
| CacheLite($options = array(NULL) X-Ref |
| Constructor $options is an assoc. Available options are : $options = array( 'cacheDir' => directory where to put the cache files (string), 'caching' => enable / disable caching (boolean), 'lifeTime' => cache lifetime in seconds (int), 'fileLocking' => enable / disable fileLocking (boolean), 'writeControl' => enable / disable write control (boolean), 'readControl' => enable / disable read control (boolean), ); param: array $options options |
| get($id, $doNotTestCacheValidity = false) X-Ref |
| Test if a cache is available and (if yes) return it param: string $id cache id param: boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested return: string data of the cache (or false if no cache available) |
| save($data, $id = NULL) X-Ref |
| Save some data in a cache file param: string $data data to put in cache param: string $id cache id return: boolean true if no problem |
| remove($id) X-Ref |
| Remove a cache file param: string $id cache id return: boolean true if no problem |
| clean() X-Ref |
| Clean the cache if no group is specified all cache files will be destroyed else only cache files of the specified group will be destroyed param: string $group name of the cache group return: boolean true if no problem |
| setLifeTime($newLifeTime) X-Ref |
| Set a new life time param: int $newLifeTime new life time (in seconds) |
| _setFileName($id) X-Ref |
| Make a file name (with path) param: string $id cache id |
| _read() X-Ref |
| Read the cache file and return the content return: string content of the cache file |
| _write($data) X-Ref |
| Write the given data in the cache file param: string $data data to put in cache return: boolean true if ok |
| _writeAndControl($data) X-Ref |
| Write the given data in the cache file and control it just after to avoir corrupted cache entries param: string $data data to put in cache return: boolean true if the test is ok |
| _hash($data, $controlType) X-Ref |
| Make a control key with the string containing datas param: string $data data return: string control key |
| Généré le : Mon Nov 26 11:57:01 2007 | par Balluche grâce à PHPXref 0.7 |
|