Cache._cache.flush_all () 不工作,如何使用 django 和 memcached 清除缓存?

Cache._cache.flush_all () not working, How can I clear the cache with django and memcached?

Cache._cache.flush_all () 不工作 如何使用 django 和 memcached 清除缓存?

来自 cache

的 Django 文档

Finally, if you want to delete all the keys in the cache, use cache.clear(). Be careful with this; clear() will remove everything from the cache, not just the keys set by your application.

您还可以通过 telnet 或 nc 连接并执行 flush_all

刷新 memcached 的内容
echo 'flush_all' | nc localhost 11211