Home  >  Article  >  Backend Development  >  Please tell me how to cache the data of each page

Please tell me how to cache the data of each page

WBOY
WBOYOriginal
2016-10-22 12:06:401918browse

For example, I request the first page
Maybe the query should be written as $Model->cache(true)page('1,10')->select();This way, the first page can be cached, and then when I access the second page, The second page is cached,
Then the cache time of the first page and the second page are different and they are out of sync. How to solve it

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