2009/5/21 Jarek Zgoda <[email protected]> > Use low-level Django cache framework to cache retrieved object but > don't forget to invalidate the cache upon each change to this object. > Like: > > obj = cache.get(obj_key) > if not obj: > obj = ObjClass.objects.get(pk=obj_pk) > cache.set(obj_key, obj) > return obj >
It's really that straight-forward, what a nice surprise! Thanks, Mark > -- > Artificial intelligence stands no chance against natural stupidity > > Jarek Zgoda, R&D, Redefine > [email protected] > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en -~----------~----~----~----~------~----~------~--~---

