On 3/8/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> You may be unlucky here in who chose to respond. There's evidence to
> suggest that I'm more of a hard-ass on this front than the other core
> developers, but only by a little bit.

Bah. Now I have to respond, because I've got a reputation to maintain :)

Anyway, I can go either way on this, I think, but I'd lean toward
making it easier to use the caching mechanisms we already have, rather
than building special-case caching into the feeds system.

If the CacheMiddleware is enabled, caching of feeds should happen
automatically because they're just calls to the 'feed' view. If it's
not, there are a couple things that are possible:

1. In 0.95.1 you can write a short wrapper around the 'feed' view,
delegate to that, and throw a cache decorator on your wrapper.
2. In trunk (and so in the forthcoming 0.96) URLConfs let you import
view functions and use them directly in 'urlpatterns', which means you
could import the 'feed' view in your urls.py and slap a cache
decorator on it right there.

We definitely need to document this more clearly -- it seems like a
lot of folks haven't noticed that you can use callables directly in
urlpatterns now, and therefore can put decorators on them in there as
well -- but personally I'd lean toward that because it leverages the
existing cache framework.

Or am I missing something here?

-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to