0

I have come across this project. It uncaches the results of a particular view in django. I want to do a similar thing but I read that this project is no longer updated. I am using Memcached and Django 1.8. I want to delete all the cache entries of a particular view whenever I make changes to the databases. Earlier I was clearing the entire cache whenever a new object was added, but I think its better to just clear the entries of concerned view. Is there someway to do it using the cache_control decorator or some other effective way?

Mandeep Thakur
  • 655
  • 1
  • 10
  • 23
Shahrukh Mohammad
  • 985
  • 2
  • 17
  • 33
  • Chances are that your site does not need any sort of caching whatsoever – e4c5 Jan 24 '17 at 10:41
  • It has a few images so I think caching will be useful – Shahrukh Mohammad Jan 24 '17 at 13:24
  • Images are usually cached using http header instructions, which tells the browser to cache images client side. This is configured in nginx a CDN, or however you serve your image files. Django caching is server side, and useful for sites with many visitors and expensive template rendering. A news portal front page is a good example. – Håken Lid Jan 24 '17 at 17:06
  • Possible duplicate of [Expire a view-cache in Django?](http://stackoverflow.com/questions/2268417/expire-a-view-cache-in-django) – Håken Lid Jan 24 '17 at 17:09

0 Answers0