pythonpython-3.xdjangodjango-settingsdjango-cache

Django default cache


I'm importing and using cache as this:

from django.core.cache import cache
cache.add('a','b',60)

I haven't defined any settings for the cache in settings.py ,then where does this cache come from and where is it stored.

Django documentation says: "This object is equivalent to caches['default']", but what is the default ?


Solution

  • In https://docs.djangoproject.com/en/stable/topics/cache/#local-memory-caching says:

    Local-memory caching

    This is the default cache if another is not specified in your settings file

    updated dead link