On Mar 19, 5:11 pm, Waqas <badar.wa...@gmail.com> wrote: > If i have enable view level cache then django saves the db queries > result in cache? > > For example i have following view: > > @cache_page(60 * 150) > def public(request): > ...... > ...... > > In this view i am quering database. > > My question is if i load this page in browser and then modify some > records in db and then i refresh the page in browser then DJango will > hit the db again?
No, that's the point of the cache... The view cache will cache the *output* of the view, however that's generated. The next time it's requested, Django will go to the cache instead of executing the view function. If you need the output to change in the meantime, you'll need to work out some way of invalidating the cache entry. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.