Monday, November 30, 2015

Clear view cache using @cache_page

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 are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/03ede9ef-e35e-4a34-8cb7-5ce0416430df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment