Home > Backend Development > PHP Tutorial > php?缓存解决方案

php?缓存解决方案

WBOY
Release: 2016-06-13 12:27:25
Original
843 people have browsed it

php?缓存
修改.php文件后,在火狐看不到最新的效果、
$tpl = new Smarty();
$tpl->caching = true;
$tpl->cache_lifetime=-1;
我设置缓存的存活时间为0,还是会出现这种情况


点击这个按钮刷新页面,有时跳到其它页面不是最新的

求解决方案
------解决思路----------------------
$tpl->caching = false; 试试

Smarty 的缓存只是针对查询结果的,并不影响浏览器
如果禁用了 Smarty 缓存,你还是不能得到实时数据,那么就应该检查浏览器的缓存设置了

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