Get list of Cache Keys in Django

As mentioned there is no way to get a list of all cache keys within django. If you're using an external cache (e.g. memcached, or database caching) you can inspect the external cache directly.

But if you want to know how to convert a django key to the one used in the backend system, django's make_key() function will do this.

https://docs.djangoproject.com/en/1.8/topics/cache/#cache-key-transformation

>>> from django.core.cache import caches
>>> caches['default'].make_key('test-key')
u':1:test-key'

For RedisCache you can get all available keys with.

from django.core.cache import cache

cache.keys('*')