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.

Reply via email to