Get Smarty

Donate

Paypal

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Advertisement

Name

clearCompiledTemplate() — 指定したテンプレートのキャッシュを破棄します。

説明

void clearCompiledTemplate(string tpl_file,
                           string compile_id,
                           int exp_time);

指定したテンプレートリソースをコンパイルした内容を破棄します。 何も指定しなかった場合は、すべてのコンパイル済みテンプレートファイルを破棄します。 $compile_id を渡すと、指定した $compile_id のテンプレートのみを破棄します。exp_time を指定すると、 exp_time 秒以上経過しているファイルのみが破棄されます。 デフォルトでは、経過時間にかかわらず全てのコンパイル済みテンプレートを破棄します。 この関数は上級者のみが使用するもので、通常は不要です。

Example 13.9. clearCompiledTemplate()


<?php
// 指定したテンプレートリソースを破棄します
$smarty->clearCompiledTemplate('index.tpl');

// コンパイルディレクトリの内容を全て破棄します
$smarty->clearCompiledTemplate();
?>

   

clearCache() も参照してください。

Comments
No comments for this page.

Advertisement

Sponsors [info]

Sponsors