--- Array (2)
0 => Array (2)
  page_nm => "トップ"
  page_sysnm => "top"
1 => Array (3)
  page_nm => "Smartyマニュアル"
  page_sysnm => "manual_smarty"
  this => 1 ---

clear_compiled_tpl()

clear_compiled_tpl()

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

説明

void clear_compiled_tpl ( [string tpl_file [, string compile_id [, int exp_time]]])

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

例 13-1. clear_compiled_tpl()

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

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

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