开发者

How to clear Smarty's Cache

开发者 https://www.devze.com 2023-02-18 06:09 出处:网络
The original owner of our company ha开发者_C百科d the website designed using Smartys. I have updated the product page, but even after deleting the temporary file from \"templates_c\" which I thought w

The original owner of our company ha开发者_C百科d the website designed using Smartys. I have updated the product page, but even after deleting the temporary file from "templates_c" which I thought was the cache file, the updated products page will not show up at all, everything still looks exactly as it did previously.

How can I clear the cache on Smartys so my modified page will be viewable?


Smarty uses a compile directory and a separate cache directory. templates_c is probably the compile directory. The cache is specified in $smarty->cache_dir. That's the one you need to empty.

In PHP with Smarty version 2, you can execute the function clear_all_cache()

$smarty->clear_all_cache();

If you are using Smarty version 3, the command is clearAllCache()

$smarty->clearAllCache();

To find out the cache directory:

echo $smarty->cache_dir;
0

精彩评论

暂无评论...
验证码 换一张
取 消