Well, you can use one of the methods from [2] to force the queryset to
evaluate before caching it.  But you'll still run a new query in order
to filter, unless you aftually filter the data in your Python code.

On Jul 15, 2:46 pm, Rob <robvan...@zonnet.nl> wrote:
> On Jul 15, 8:34 pm, Nan <ringe...@gmail.com> wrote:
>
> > Querysets are evaluated lazily.[1][2]  You may have better success
> > using template fragment caching[3] to cache the menu output.
>
> Thanks for the reply.
>
> I read the part about the "lazy" querysets and therefore I suspected
> the database not to be hit. This also doesn't count for querysets from
> a cache. Perhaps I should turn of caching for the menu (are only a few
> items)
>
> Unfortunately template caching is no option for me, because the menu
> items depend on a session.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to