On Fri, Nov 28, 2008 at 7:15 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> I'd be -1, that would mean storing some sort of global(thread local
> probably) instance of the request, plus any other object that you'd
> want to cache on.  And that just seems like a bad idea.  There's no
> reason a developer can't create a simple function that takes a few
> objects(maybe the obj/queryset to be cached, the request, and whatever
> else needs to be known to determine the key), and than get's or sets
> the appropriate key.

I understand the code smell of a global, but notice that an important
feature of blackboard is that some knowledge source publishes, and
other places consume, but the global state for a given key is not
mutated.

Anyway, to be clear, no, you wouldn't have to store the request object
globally-- it could be a dictionary containing a subset of useful keys
published by BaseHandler.get_response.

--~--~---------~--~----~------------~-------~--~----~
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