codeigniter启用缓存与清除缓存方法分享

WBOY
Release: 2016-07-25 08:53:07
Original
990 people have browsed it
本文介绍了codeigniter启用缓存与清除缓存的方法,依靠网页缓存,网页可以达到近乎静态网页的加载速度,因为将程序输出的结果保存到硬盘上了。

codeigniter启用缓存与清除缓存人方法

codeigniter 支持缓存技术,以达到最快的速度。 尽管ci已经相当高效了,但是网页中的动态内容、主机的内存cpu 和数据库读取速度等因素直接影响了网页的加载速度。 依靠网页缓存,网页可以达到近乎静态网页的加载速度,因为将程序输出的结果保存到硬盘上了。

缓存是怎么工作的? CI支持每个页面单独缓存,而且可以设置缓存更新时间。 当一个网页第一次被加载的时候,缓存文件将被保存到application/cache文件夹。 下次访问时,系统就会直接读取缓存文件,然后返回给用户的浏览器。如果缓存文件过期,它将被删除并重新生成。



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!