Cache_Lite_Output::start() -- Test if a cache is available and (if yes) return it to the browser. Else,
the output buffering is activated.
Описание
Test if a cache is available and (if yes) return it to the browser. Else,
the output buffering is activated.
Параметр
- string
$group
name of the cache group
- boolean
$doNotTestCacheValidity
if set to TRUE, the cache validity won't be tested
Возвращаемое значение
returns true if the cache is hit (false else)
Заметка
Эта функция не должна вызываться статически.
Пример
Пример 30-1. classical using <?php
require_once "Cache/Lite/Output.php";
$options = array(
'cacheDir' => '/tmp/',
'lifeTime' => 7200,
'pearErrorMode' => CACHE_LITE_ERROR_DIE
);
$cache = new Cache_Lite_Output($options);
if (!($cache->start('id_of_the_page'))) {
// Cache not hit !
// All the output is bufferised until the end() method
// (...)
$cache->end();
}
?> |
|