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: jerf@… 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)

cache.control.on.syndication.code.only.diff (6.2 KB ) - added by jerf@… 18 years ago.
a code only prototype of the cache system, for discussion purposes

Download all attachments as: .zip

Change History (11)

by jerf@…, 18 years ago

a code only prototype of the cache system, for discussion purposes

comment:1 by Simon G. <dev@…>, 18 years ago

Triage Stage: UnreviewedAccepted

comment:2 by jerf@…, 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 Malcolm Tredinnick, 18 years ago

Owner: changed from Adrian Holovaty to Malcolm Tredinnick

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 anonymous, 16 years ago

Resolution: fixed
Status: newclosed

comment:5 by anonymous, 16 years ago

Resolution: fixed
Status: closedreopened

comment:6 by Ben Firshman, 14 years ago

Cc: Ben Firshman added
Component: Contrib appsRSS framework

Can't this be done with Django's existing caching tools now feeds are views?

http://docs.djangoproject.com/en/1.2/topics/cache/

comment:7 by Julian Bez, 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 Łukasz Rekucki, 14 years ago

Severity: Normal
Type: New feature

comment:9 by Tom Christie, 14 years ago

Cc: tom@… added
Easy pickings: unset

comment:10 by Aymeric Augustin, 13 years ago

Resolution: fixed
Status: reopenedclosed
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())

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