Re: Re: caching views with dynamic parameters

2006-11-14 Thread James Bennett
On 11/14/06, Christian Joergensen <[EMAIL PROTECTED]> wrote: > Reading Jeremy's discovery, this will not work. I naturally assumed the > cache generated the key from the arguments. You might try using the 'vary_on_headers' decorator; since you're switching based on the language being served, doin

Re: caching views with dynamic parameters

2006-11-14 Thread Christian Joergensen
Christian Joergensen wrote: > You could do a simple: > > def my_view(request): > return render_my_view(request, request.session.LANGUAGE_CODE) > > def render_my_view(request, language_code): > # do stuff > > render_my_view = cache_page(render_my_view, cache_time) Reading Jeremy's dis

Re: caching views with dynamic parameters

2006-11-13 Thread Patrick
On Mon, 13 Nov 2006 19:04:19 -0600, Jeremy Dunck wrote: > On 11/13/06, Patrick <[EMAIL PROTECTED]> wrote: >> I'd appreciate your informative answers and am >> looking forward to getting familiar with this part of the framework. > > Can you show the code that's storing the cached info? There are

Re: caching views with dynamic parameters

2006-11-13 Thread Jeremy Dunck
On 11/13/06, Patrick <[EMAIL PROTECTED]> wrote: > I'd appreciate your informative answers and am > looking forward to getting familiar with this part of the framework. Can you show the code that's storing the cached info? There are several ways to get data into and out of the cache (all document

caching views with dynamic parameters

2006-11-13 Thread Patrick
I'm trying to implement caching and for now decided to use MySQL cache table. I have a view that renders_to_response an object_list built from querying a 3rd party storage system (xml database). The object_list items depend on the value of 'request.session.LANGUAGE_CODE' variable. The cache table