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:
{nocache}
は、
テンプレートの特定の部分のキャッシュを無効にします。
{nocache}
は、必ずそれに対応する
{/nocache}
とペアで使わなければなりません。
キャッシュしない部分で使ったすべての変数は、 ページがキャッシュから読み込まれるときに PHP にも代入されます。
Example 7.57. テンプレートの特定の部分のキャッシュを回避する
Today's date is {nocache} {$smarty.now|date_format} {/nocache}
上のコードは、キャッシュしたページに現在の日付を出力します。
キャッシュ の節も参照ください。