Re: Clear view cache using @cache_page

2018-07-09 Thread Ravi Bhushan
plzz solve this problem On Monday, November 30, 2015 at 11:13:29 PM UTC+5:30, Dimitris R wrote: > > Hello, > > I am using Django 1.8.2 and caching my views using the @cache_page > decorator: > > @cache_page(60 * 5) > def view_name(request, obj_id): > [...] > > Is there a way to clear the cache

Re: Clear view cache using @cache_page

2018-07-09 Thread Ravi Bhushan
plzz solve this problem https://stackoverflow.com/questions/51239469/cache-invalidation-is-not-working-in-browser-using-or-app-rest-api On Monday, November 30, 2015 at 11:13:29 PM UTC+5:30, Dimitris R wrote: > > Hello, > > I am using Django 1.8.2 and caching my views using the @cache_page > dec

Re: Clear view cache using @cache_page

2015-12-01 Thread Dimitris R
Thanks for your reply Tim. I have tried the code provided, but it seems that the cache is not deleted. I am testing the code in development, which uses django.core.cache.backends.locmem.LocMemCache. I don't know if that makes any difference. Also, I have noticed that the path in *url.path*

Re: Clear view cache using @cache_page

2015-11-30 Thread Tim Graham
I don't know of a simple way. Here's something I wrote to achieve that on djangoproject.com (invalidating a cached blog post on save): https://github.com/django/djangoproject.com/blob/90e92fd18543f95685c24f84dc5e1269a5acc38a/blog/models.py#L105-L116 Adding something to Django to help with this s

Clear view cache using @cache_page

2015-11-30 Thread Dimitris R
Hello, I am using Django 1.8.2 and caching my views using the @cache_page decorator: @cache_page(60 * 5) def view_name(request, obj_id): [...] Is there a way to clear the cached entry programmatically, prior of the cache timeout? Thanks, Dimitris -- You received this message because you