Home >Backend Development >PHP Tutorial >codeigniter enable cache and clear cache method sharing

codeigniter enable cache and clear cache method sharing

WBOY
WBOYOriginal
2016-07-25 08:53:071136browse
This article introduces the method of enabling cache and clearing cache in codeigniter. Relying on web page caching, web pages can reach a loading speed close to that of static web pages, because the results output by the program are saved to the hard disk.

How to enable cache and clear cache in codeigniter

codeigniter supports caching technology to achieve the fastest speed. Although ci is already quite efficient, factors such as the dynamic content in the web page, the host's memory CPU and database reading speed directly affect the loading speed of the web page. Relying on web page caching, web pages can achieve a loading speed that is close to that of static web pages, because the results output by the program are saved to the hard disk.

How does caching work? CI supports separate caching of each page and can set the cache update time. When a web page is loaded for the first time, cache files will be saved to the application/cache folder. On the next visit, the system will directly read the cache file and return it to the user's browser. If the cache file expires, it will be deleted and regenerated.



Statement:
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