smarty cache application and clearing

WBOY
Release: 2016-07-25 09:10:32
Original
1050 people have browsed it
1. Smarty cache configuration $smarty->cache_dir = "/caches/"; //cache directory $smarty->caching = true; //Enable caching. When it is flase, the cache will be invalid. $smarty->cache_lifetime = 60; //slow

1. Smarty cache configuration $smarty->cache_dir = "/caches/"; //cache directory $smarty->caching = true; //Enable caching. When it is flase, the cache will be invalid. $smarty->cache_lifetime = 60; //Cache time

2. Using and clearing Smarty cache $smarty->display('cache.tpl', cache_id); //Create a cache with ID $smarty->clear_all_cache(); //Clear all caches $smarty->clear_cache('index.htm'); //Clear the cache of index.tpl $smarty->clear_cache('index.htm',cache_id); //Clear the cache of the specified id



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template