title: Django inspect local memory cache from shell
body: <p>I would like to know if there is a way to inspect the content stored in the <strong>local memory cache</strong> from Django shell.</p>
  
  <p>I found this answer: <a href="https://stackoverflow.com/questions/13630237/contents-of-locmem-cache-in-django">Contents of locmem cache in django?</a></p>
  
  <p>But it did not work. This is what I have tried so far:</p>
  
  <pre><code>python manage.py shell
  &gt;&gt;&gt; from django.core.cache import caches
  &gt;&gt;&gt; caches.all()
  []
  </code></pre>
  
  <p>I found the wonderful plugin: <a href="https://github.com/django-debug-toolbar/django-debug-toolbar" rel="nofollow noreferrer">Django debug toolbar</a>. I can verify from the debug panel that the cache I created did exist and it has content in it.</p>
  
  <p>I just want to know how to look at the cached content from Django shell.</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p>Here is how I defined my local memory cache:</p>
  
  <pre><code>CACHES = {
      'default': {
          'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
          'LOCATION': 'question_cache',
          'TIMEOUT': 60 * 60,     # 60 secs * 60 mins
          'OPTIONS': {
              'MAX_ENTRIES': 100
          },
      }
  }
  </code></pre>