If smarty transmits values to the template dynamically, the generated cache is also dynamic.

Source: Internet
Author: User
If the value of smarty is dynamic to the template, the generated cache is also dynamic. if the value of smarty & nbsp; is dynamic to the template, the generated Cache & nbsp; it's also dynamic. why ??? Example: $ smarty-& gt; caching & nbsp; true; $ smarty-& gt; cache_lifetime & nbsp; 50100 if the value transmitted to the template by smarty is dynamic, the generated cache is also dynamic.
If the value passed to the template by smarty is dynamic, the generated cache is also dynamic. why ???


Example: $ smarty-> caching = true;
$ Smarty-> cache_lifetime = 50100;
$ Showtime = date ("YmdHms ")
// Set the cache file name
$ Smarty-> assign ("Name", "Fred ");
$ Smarty-> assign ("Time", $ showtime );



The value of $ showtime page refresh received in the template file remains unchanged. isn't it cached ??
Why does it change ??????

Share To: caching? =? True; $ smarty-> cache_lifeti... 'data-pics = ''>


------ Solution --------------------
Yes, it will not change. Use a lower version of smarty.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.