Opened 17 years ago
Closed 17 years ago
#5813 closed (fixed)
CacheMiddleware should respect max-age
Reported by: | Chris Beaven | Owned by: | nobody |
---|---|---|---|
Component: | Core (Cache system) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This came up in IRC today, someone (K0001) wanted to use the per-site middleware but disable caching for a specific view. It seems like the django.views.decorators.cache.never_cache
decorator should work but it wasn't.
The reason is because currently the cache middleware doesn't bother looking to see if an expiry age was set by the response, it just uses the CACHE_MIDDLEWARE_SECONDS
setting.
Attachments (1)
Change History (5)
by , 17 years ago
Attachment: | cache_middleware_respect_maxage.diff added |
---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:4 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
For example (assuming you have the middleware turned on):
When/if this is committed it should probably be noted on BackwardsIncompatibleChanges that the per-site cache logic has changed.