What is Smarty?
Why use it?
Use Cases and Work Flow
Syntax Comparison
Template Inheritance
Best Practices
Crash Course
You may use the Smarty logo according to the trademark notice.
For sponsorship, advertising, news or other inquiries, contact us at:
clear_compiled_tpl() — 指定したテンプレートのキャッシュを破棄します。
void clear_compiled_tpl(string tpl_file,
string compile_id,
int exp_time);
指定したテンプレートリソースをコンパイルした内容を破棄します。
何も指定しなかった場合は、すべてのコンパイル済みテンプレートファイルを破棄します。
$compile_id
を渡すと、指定した
$compile_id
のテンプレートのみを破棄します。exp_time を指定すると、
exp_time
秒以上経過しているファイルのみが破棄されます。
デフォルトでは、経過時間にかかわらず全てのコンパイル済みテンプレートを破棄します。
この関数は上級者のみが使用するもので、通常は不要です。
Example 13.9. clear_compiled_tpl()
<?php // 指定したテンプレートリソースを破棄します $smarty->clear_compiled_tpl('index.tpl'); // コンパイルディレクトリの内容を全て破棄します $smarty->clear_compiled_tpl(); ?>
clear_cache()
も参照してください。