After debugging for many hours, I just give up and ask for your help. Original app isn’t as simple as my example, but the problem is the same: problems w/ cache reloading. Original app caches the view and provides another view which should change contents in database and reload cache. I have created demo app which shows that cache.clean() does NOT work. Cache is cleaned only when contents in database are expired. Why is that so?
After debugging for many hours, I just give up and ask for your help.
Share
Problem was browser cache. Browser itself cached the results and that’s why I didn’t see changes.
Solution was to add
@cache_control(no_cache=True)in front of cached view. That decorator simply disables browser cache.