You could use the cache template tag https://docs.djangoproject.com/en/dev/topics/cache/#template-fragment-caching
And cache only certain parts of your template and not all of it 2011/12/18 Nathan Geffen <nathangef...@gmail.com>: > Hi > > I am using per-view caching in version 1.3 and would prefer to avoid > caching in my templates as far as possible. However, I've hit a snag. > If the messaging framework generates a message for a cached view, one > of two things happen: > > 1. If the page is not yet in cache, the page gets cached with the > message in it. So next time a user goes to the page, they get an old > message. > > 2. If the page is already in cache, the message isn't displayed. > > Is there a simple way to address this? Perhaps something I can put in > a vary_on_headers decoration? Or is there a simple way to tell Django > to put the message into a query string so that the page with the > message is cached separately from the page without the message? > > Thanks. > > -- > 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. > -- Andrés Reyes Monge armo...@gmail.com +(505)-8873-7217 -- 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.