On 11.07.2007., at 14:25, Nebojša Đorđević wrote: > Full code is at http://dpaste.com/hold/14105/
Here is my final take on this problem: http://dpaste.com/hold/14122/ I changed caching so that all of the queries related to the one model are stored inside single cache key. This way I can invalidate all of them when change is detected. Downside is that if any of the model rows is changed all data is invalidated so next queries will hit DB again. OTOH this way I can be sure that I'll always get latest data from the DB. I tried to make new Model subclass to avoid need to add track_changes, but then I started to get some weird errors about missing table names so I returned to this approach. (I know, I know, model subclassing don't work, yet ;) ) Tried this code on the one of the my projects and it's working nice (no real testing tough). -- Nebojša Đorđević - nesh, ICQ#43799892, http://www.linkedin.com/in/ neshdj Studio Quattro - Niš - Serbia http://studioquattro.biz/ | http://code.google.com/p/django-utils/ Registered Linux User 282159 [http://counter.li.org] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
