Re: Caching at model class level

2011-11-04 Thread Malcolm Box
On 4 November 2011 07:02, Thomas Guettler wrote: > Am 03.11.2011 18:42, schrieb Tom Evans: > > On Thu, Nov 3, 2011 at 2:22 PM, Thomas Guettler wrote: > >> Hi, > >> > >> I try to reduce the number of db-queries in my app. > >> > >> There is a model which

Re: Caching at model class level

2011-11-04 Thread Thomas Guettler
Am 03.11.2011 18:42, schrieb Tom Evans: > On Thu, Nov 3, 2011 at 2:22 PM, 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. >>

Re: Caching at model class level

2011-11-03 Thread Tom Evans
On Thu, Nov 3, 2011 at 2:22 PM, 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

Re: Caching at model class level

2011-11-03 Thread Andre Terra
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]

Re: Caching at model class level

2011-11-03 Thread Thomas Guettler
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

Re: Caching at model class level

2011-11-03 Thread Donald Stufft
Normally this is cached using the Django caching framework, this lets you save it in memcache, redis, etc 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

Caching at model class level

2011-11-03 Thread Thomas Guettler
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. I