I'm using django's Memcached and the per-view caching mechanism with the @cache_page(timeout)
decorator.
Inside a particular view function I wish to clear the entire cache.
I tried cache.clear()
and cache._cache.flush_all()
but neither seem to flush the cache.
Is there some other way to do this or am I doing it wrong?
EDIT: I realize that completely clearing the cache is not such a good idea as opposed to just deleting the required keys. However, I do not know the keys for the views I've decorated with @cache_page(timeout) How do I get to know these? And after I acquire the key, I just do a cache.delete(key)?
Thanks!