|
Cache_Lite_Output (Previous) |
(Next) Cache_Lite_Output::end |
||||
| |
|||||
|
|||||
boolean Cache_Lite_Output::start (
string $id
, string $group = 'default'
, boolean $doNotTestCacheValidity
= = false
)
キャッシュが有効かどうかをテストし、(有効であれば) ブラウザにそれを返します。あるいは出力バッファリングが有効になります。
キャッシュIDを指定します
キャッシュグループ名を指定します
TRUE の場合、キャッシュの妥当性はチェックされません
returns キャッシュがヒットすれば true (そうでなければ false)
This function can not be called statically.
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'))) {
// キャッシュがヒットしなかった !
// 全ての出力は end() メソッドまでバッファされる
// (...)
$cache->end();
}
?>
|
Cache_Lite_Output (Previous) |
(Next) Cache_Lite_Output::end |
||||||||
| |
|||||||||
|
|||||||||