Malcolm Tredinnick wrote:
> Cool. I'll have a look at it in detail. From a first read, though, it
> looks like a reasonable approach: building in cache management to the
> view. Why can't this be done using the normal CacheMiddleware, though?
>   
I hadn't read the source on that; now I have. It's close, but it's not 
exactly the same.

I've spun myself into senselessness on this issue and I'm not sure I can 
defend it anymore. (Seriously; I've been running around with this for an 
hour now.) You can't quite get the *exact* behavior out of any 
combination of wrappers or middleware, because in general only the view 
can use local information to realize it can jump out early, as in the 
patch. Also in general, the view can make smarter decisions about ETags 
and Last-Modified than the middleware can. But if the cache middleware 
is enough to satisfy you, I'll just maintain my changes locally.

(It is still the behavior I want; by the time you have "category feeds" 
and "all entry feeds" and a couple of other kind of feeds, trying to 
work out which feeds to expire when a blog entry changes is not 
worthwhile. This doesn't require fragile guessing of which keys to 
expire. I also actually *like* the fact this isn't dependent on the 
cache middleware at all; at the moment I'm not actually using memcached 
or anything because it doesn't make sense anywhere but RSS. It's the 
best solution for me. Ultimately, it's not that the built-in caching 
support can't do it at *all*, it's that a smarter view can do it 
*better*, but that may not be enough to justify breaking the rules. No 
sarcasm. I respect your collective judgments.)

Broadly speaking, I'm still critical of a syndication framework that 
makes it easy to create RSS feeds that support no caching at all; many 
is the blogger that has been bitten by feeds that didn't support any of 
the caching options. Not every user can be expected to realize this. But 
perhaps the best solution is simply to document this potential problem 
clearly and wash your hands of it.
> The work you seem to be doing may well be of real benefit, so don't
> think I'm dismissing it out of hand. Even just talking through the
> design is going to help somebody someday.
>   
No, I understand. You can't just throw any old thing into the 
repository. I wouldn't like Django if you did.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
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