[Fixed]-Can't delete cache for specific entry in Django


cache.set(key, None, 0) should be enough, I’ve been clearing cache keys that way before.

If you are able to, can you try the cache.clear(), to clear it all? Just to see if it works.

Are non of your cache keys deletable? Is the output of this as expected?

cache.set('testkey', 'testvalue', 600)
cache.set('testkey', 'testvalue2', 600)
cache.set('testkey', 'another value', 600)

And have you tried with another caching backend? It looks like everything you are doing is correct.

Maybe the error is in the backend, some configuration that wont let it overwrite keys or something weird..


Leave a comment