且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

php“页面缓存” CMS应用程序的解决方案建议

更新时间:2023-10-17 23:54:04

我不太确定您要寻找什么。

I'm not quite sure what you're looking for.

如果您要谈论的是从CMS生成页面并将其放置在请求的URI中(因此下一个请求甚至会绕过CMS)-可以,但是您可以刷新页面缓存有点困难。

If you're talking about generating a page (from the CMS) and placing it at the requested URI (so the next request bypasses even the CMS) - it's possible, but you make refreshing the 'cache' a little difficult.

但是,您可能正在寻找的只是服务器端缓存(而不是告诉浏览器要缓存页面多长时间)。 。这些通常基于文件或内存,如果将缓存机制放在​​CMS流中(可能是它处理请求的地方)较高,则将缓存页面创建的很大一部分。

However, what you may be looking for is just a server side cache (as opposed to telling the browser how long to cache a page). Those are usually file or memory based, and if you place the caching mechanism high in the CMS flow (perhaps where it processes the requests), you'll be caching a large portion of page creation.

一些缓存库可让您设置无限的生存期(例如 Zend_Cache ),由您自己负责缓存的维护。那可能就是您想要的。

Some cache libraries let you set an unlimited lifetime (for example Zend_Cache), leaving the cache maintenance up to you. That may be what you're looking for.