php“页面缓存” CMS应用程序的解决方案建议 [英] php "page caching" solution suggestions for CMS Applications

查看:41
本文介绍了php“页面缓存” CMS应用程序的解决方案建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大多数示例使用基于时间的缓存过期。我想了解有关文件缓存的更多信息(仅当给定目录中没有文件时才调用数据库)。这是一个具有php / mysql的CMS功能的基本信息站点。我的搜索返回了Web应用程序上的太多站点。将CMS添加到搜索中将返回脚本存储库。我会很感激您的建议。

Most examples use time-based cache expiration. I'd like to read more about file caches (where the database is called only when there is no file in a given directory). This is for a basic information site with CMS functions made with php/mysql. My searches are returning too many sites on web applications. Adding CMS to the search returns script repositories. I'd appreciate your suggestions.

推荐答案

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

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.

这篇关于php“页面缓存” CMS应用程序的解决方案建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆