Opened 18 years ago
Closed 13 years ago
#3680 closed New feature (fixed)
Add cache control (ETag, Last Modified) to django.contrib.syndication
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.syndication | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Ben Firshman, tom@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Because RSS feeds can be the hardest hit part of a website, they need to be as efficient as possible; they are often the "inner loop" of a website. Good support for being able to return 304 with as little cost as possible is necessary, preferably as easily as possible.
Attachments (1)
Change History (11)
by , 18 years ago
Attachment: | cache.control.on.syndication.code.only.diff added |
---|
comment:1 by , 18 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 18 years ago
Hang on, my impression of this is that it was rejected by discussion on the list.
If it is something that Django wishes to add, I think I've got a slightly better patch locally, I'm happy to write docs, and I'll burn it in on my own site before submitting it (since now the only thing to shoot for is 1.0, which I presume is a ways off). But I don't want to put any work on it if it's just going to be rejected.
comment:3 by , 18 years ago
Owner: | changed from | to
---|
The intention of your changes is correct, that was never rejected -- allowing early bailout is a worthy goal. I'm not sure your patch is doing the work in the right place, but it's probably pretty close. Attach your best patch so that we can review it and either apply it or do something similar.
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:6 by , 14 years ago
Cc: | added |
---|---|
Component: | Contrib apps → RSS framework |
Can't this be done with Django's existing caching tools now feeds are views?
comment:7 by , 14 years ago
ConditionalGetMiddleware should do the work of responding with 304 etc. so that's not needed here.
#7936 also is specifically about the Last-Modified issue and has a nice patch for it.
comment:8 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:9 by , 14 years ago
Cc: | added |
---|---|
Easy pickings: | unset |
comment:10 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
UI/UX: | unset |
Django now provides general-purpose caching features that cover the scope of this ticket.
Use the condition decorator on your feed views: my_feed_view = condition(etag_func=..., last_modified_func=...)(MyFeedClass())
a code only prototype of the cache system, for discussion purposes