ThinkPHP静态缓存更新问题

WBOY
Release: 2016-06-23 14:02:55
Original
1323 people have browsed it

在前台生成HTML文件,然后直接访问,问题是后台怎么实现让前台生成过的HTML文件更新呢


回复讨论(解决方案)

楼主使用的是否是,thinkphp的静态缓存,如果是的话后台更新后最简单的方法是删除缓存,或者前台静态缓存设置缓存时间。

删除缓存的话前台访问静态HTML就访问不到了,缓存时间的话那也要重新访问该动态页面才能跟新静态的HTML,一般这种更新缓存是不是脚本一个个访问动态页面然后生成静态HTML的

个人愚见:其实更新缓存跟删除缓存是一个道理,都需要重新生成新的静态缓存。

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!