?
このドキュメントでは、 php中國(guó)語(yǔ)ネットマニュアル リリース
This tells Smarty whether or not to cache the output of the templates.
By default this is set to 0, or disabled. If your templates generate
redundant redundant content, it is advisable to turn on caching. This
will result in significant performance gains. You can also have multiple
caches for the same template. A value of 1 or 2 enables caching. 1 tells
Smarty to use the current $cache_lifetime variable to determine if the
cache has expired. A value of 2 tells Smarty to use the cache_lifetime
value at the time the cache was generated. This way you can set the
cache_lifetime just before fetching the template to have granular
control over when that particular cache expires. See also is_cached.
告訴Smarty是否緩存模板的輸出.默認(rèn)情況下,她設(shè)為0,或無(wú)效.如果模板產(chǎn)生冗余內(nèi)容,建議打開(kāi)緩存.這樣有利于獲得良好的性能增益.你也可以為同一模板設(shè)有多個(gè)緩存.當(dāng)值為1或2時(shí)啟動(dòng)緩存.1告訴Smarty
使用當(dāng)前的$cache_lifetime變量判斷緩存是否過(guò)期.2告訴 Smarty
使用生成緩存時(shí)的cache_lifetime值.用這種方式你正好可以在獲取模板之前設(shè)置緩存生存時(shí)間,以便較精確地控制緩存何時(shí)失效.
If $compile_check is enabled, the cached content will be regenerated if
any of the templates or config files that are part of this cache are
changed. If $force_compile is enabled, the cached content will always be
regenerated.
如果啟動(dòng)了編譯檢查,一旦任何的模板文件或配置文件(有關(guān)緩存部分的配置文件)被修改,緩存的內(nèi)容將會(huì)重新生成.如果啟動(dòng)了強(qiáng)迫編譯,緩存的內(nèi)容將總會(huì)重新生成.