plone.caching截获了所有304s的错误
我最近开始在视图中添加plone.caching规则集声明:plone.caching截获了所有304s的错误,plone,Plone,我最近开始在视图中添加plone.caching规则集声明: <cache:ruleset for=".views.MyContentTypeView" ruleset="plone.content.itemView" /> 从hooks.py,在intercept()的docstring中: To properly abort request processing, this will raise an exception. The actual resp
<cache:ruleset
for=".views.MyContentTypeView"
ruleset="plone.content.itemView"
/>
从hooks.py,在intercept()的docstring中:
To properly abort request processing, this will raise an exception. The
actual response (typically an empty response) is then set via a view on
the exception. We set and lock the response status to avoid defaulting to
a 404 exception.
因此,看起来这些错误可能是预期行为?如果是这样的话,有没有可能让Zope忽略这些错误,这样它们就不会使我的日志混乱?在安装plone.app.caching时,应该将拦截的异常添加到错误日志中被忽略的异常类型列表中。也许这并没有发生?我认为引发异常(HTTP 304)是让ZPublisher停止遍历where is it now并立即跳转到创建304响应的唯一方法。基本上这是一个优化。我猜。这两个评论都同意这样一个前提,即这是意料之中的。我将查看我忽略的异常类型中的内容。拦截不在我忽略的异常类型中--我从Beta开始就使用p.a.caching,所以可能在我的初始安装期间没有添加它。
To properly abort request processing, this will raise an exception. The
actual response (typically an empty response) is then set via a view on
the exception. We set and lock the response status to avoid defaulting to
a 404 exception.