Django caching frameworks also provide a low level API[1].

sebleier's django-redis-cache is one great tool for the job [2]. In order
to use it, you will of course need redis too [3].


Cheers,
AT

[1]
https://docs.djangoproject.com/en/dev/topics/cache/#the-low-level-cache-api
[2] https://github.com/sebleier/django-redis-cache
[3] http://redis.io



On Thu, Nov 3, 2011 at 1:33 PM, Thomas Guettler <h...@tbz-pariv.de> wrote:

> Am 03.11.2011 15:29, schrieb Donald Stufft:
> >  Normally this is cached using the Django caching framework, this lets
> > you save it in memcache, redis, etc
>
> The django caching frameworks provides decorators for caching complete
> web pages. And it provides an API for caching strings or objects which can
> get pickled.
>
> It does not provide caching at object level, if new query sets get used
> (like related
> object look-up).
>
> Try it yourself. This middleware shows how many times the same SQL query
> was executed:
>
> http://djangosnippets.org/snippets/344/
>
>
>  Thomas
>
> > On Thursday, November 3, 2011 at 10:22 AM, Thomas Guettler wrote:
> >
> >> Hi,
> >>
> >> I try to reduce the number of db-queries in my app.
> >>
> >> There is a model which changes almost never. It is like a "type of
> ticket"
> >> in a trouble ticket system.
> >>
> >> On one page there are seven SQL-Queries (SELECT .... FROM ticket_type
> >> where id=123) which of course always return
> >> the same result.
> >>
> --
> Thomas Guettler, http://www.thomas-guettler.de/
> E-Mail: guettli (*) thomas-guettler + de
>
> --
> 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.
>
>

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