Get Smarty

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:

Check reviews of PHP Web Hosting, compatible with Smarty Templates

$caching

テンプレートの出力を $cache_dir にキャッシュするかどうかを設定します。 デフォルトは 0 で、これは無効を意味します。 テンプレートが何度も同じコンテンツを生成するような場合は、 $caching を有効にするほうがよいでしょう。 これにより、パフォーマンスが向上します。

複数の キャッシュをひとつのテンプレートファイルに持たせることもできます。

  • 値として 1 または 2 を指定すると、キャッシュを有効にします。

  • 1 は、Smarty にそのキャッシュが期限切れかどうかを調べるために、 現在の時間と $cache_lifetime の値を比較するように指示します。

  • 2 は、Smarty にそのキャッシュが生成された時点の時間と $cache_lifetime の値を比較するように指示します。このようにキャッシュの期限を制御するために、 テンプレートを 取得 する直前に $cache_lifetime をセットする事ができます。詳細は、 is_cached() の項を参照して下さい。

  • $compile_check が有効な場合、キャッシュに含まれるテンプレートや設定ファイルが変更されていると、 キャッシュが再生成されます。

  • $force_compile が有効ならばキャッシュは常に再生成されます。

$cache_dir$cache_lifetime$cache_handler_func$cache_modified_checkis_cached() および キャッシュの項 も参照してください。

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 12 plus 9? (Are you human?)

Sponsors [info]

Cheap Website Hosting @hostdone.com
email marketing @ActiveCampaign
broadband deals @BroadbandGenie
Best UK Web Hosting @webhost.uk.net
Reliable UK and US Web Hosting @rshosting.com
Cheap US and UK Web Hosting @infrenion.com
I.T Certification Exams @pass-guaranteed.com
Certification Practice Tests @firsttrycertify.com
Certification Practice Exam Questions @ace-it-certifications.com
Broadband Speed Test @broadbandspeed.co.uk
bulk email software @americaint.com
ASP.NET hosting @aspnethosting.co.uk