Code

Opened 3 years ago

Closed 3 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: UI/UX:

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

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by lukeplant

  • Type set to Bug

comment:2 Changed 3 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Severity set to Normal
  • Status changed from new to closed
  • Type changed from Bug to New 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.