Opened 14 years ago

Closed 14 years ago

#15538 closed New feature (wontfix)

FetchFromCacheMiddleware ignore request header field cache-control

Reported by: jfp@… Owned by: nobody
Component: Core (Cache system) Version: 1.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hello,

Cache-Control field contains in the request header is ignored by FetchFromCacheMiddleware.

So, for example, if the request contains "Cache-Control: max-age=0", the cached page is return instead of build a new version.

According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html Cache-Control can be set on the erquest header and may be different from the Cache-Control of the reply.

Regards

Change History (2)

comment:1 by Luke Plant, 14 years ago

Type: Bug

comment:2 by Jacob, 14 years ago

Resolution: wontfix
Severity: Normal
Status: newclosed
Type: BugNew feature

I don't believe that Django's cache middleware listens to *any* of the request cache keys, and I'm not 100% sure it should. The goal of the cache framework (I think) isn't to compete with something like Varnish or Squid; I'm fairly sure doing something like this is out of scope.

I'm going to reject this, then, because making this change would be much bigger than just Cache-Control: we'd basically have to turn Django's cache middleware into a proper upstream cache. Feel free to suggest that change on django-dev, but my feeling is that's out of scope for Django.

Note: See TracTickets for help on using tickets.
Back to Top