如何确定 CherryPy 是否正在缓存响应?

发布于 2024-09-19 10:13:20 字数 61 浏览 5 评论 0原文

CherryPy 在其默认配置中是否可能缓存对我的一个或多个请求处理程序的响应?如果是这样,我该如何关闭它?

Is it possible that CherryPy, in its default configuration, is caching the responses to one or more of my request handlers? And, if so, how do I turn that off?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

世界如花海般美丽 2024-09-26 10:13:20

根据文档,确实有一个缓存(对于GET),您可以通过在配置中禁用它

tools.caching.on = False

Per the docs, there is indeed a cache (for GET), and you can disable it by having in your configuration

tools.caching.on = False
木格 2024-09-26 10:13:20

CherryPy 有一个缓存工具,但默认情况下它不会打开。不过,大多数 HTTP 响应默认情况下都是可缓存的,因此请在客户端和服务器之间寻找中间缓存。先看浏览器。

如果您不确定您的内容是否被缓存,请将日期响应标头与当前时间进行比较。

CherryPy has a caching Tool, but it's never on by default. Most HTTP responses are cacheable by default, though, so look for an intermediate cache between your client and server. Look at the browser first.

If you're not sure whether or not your content is being cached, compare the Date response header to the current time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文