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

$cache_lifetime

テンプレートのキャッシュの期限(単位:秒)です。これが切れるとキャッシュは再生成されます。

  • $cache_lifetime を使用するためには、 $caching を有効に (1 あるいは 2 のいずれかに) する必要があります。

  • $cache_lifetime の値を -1 にすると、キャッシュを無期限で有効とします。

  • この値を 0 にすると、キャッシュを常に再生成します (これはテスト時にのみ有用です。 キャッシュを無効にするためには、より効率的な方法として $caching = 0 があります)。

  • 各テンプレートごとに有効期限を独自に設定したい場合は $caching = 2 とします。そして display() あるいは fetch() を呼び出す前に $cache_lifetime に値を設定してください。

$force_compile が有効の場合、キャッシュファイルは毎回再生成されるので事実上キャッシュは無効になります。 clear_all_cache() 関数で全てのキャッシュを、clear_cache() 関数で特定のキャッシュファイル (グループ) をクリアする事が出来ます。

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 3 plus 16? (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