>This variable would be set at the beginning/end of requests, and also
>when switching threads in a multi threaded server, if any exist... This
>way the .cached() would be unnecessary - the cache would be scoped to
>the request in the web context, and caching contexts could be explicitly
>set in other contexts.

I've done something like this with my fluid environment stuff for
Python. Quite handy and can easily be used outside the context of web
requests, too. And it could be used for some other parts in Django, too
- we do already have some places where we have threadlocals (like the
current language) which could be expressed easily with fluid
(dynamically scoped) variables.

bye, Georg

Reply via email to