Django cache settings
Django provides the following cache settings:
CACHES
: A dictionary containing all available caches for the project.CACHE_MIDDLEWARE_ALIAS
: The cache alias to use for storage.CACHE_MIDDLEWARE_KEY_PREFIX
: The prefix to use for cache keys. Set a prefix to avoid key collisions if you share the same cache between several sites.CACHE_MIDDLEWARE_SECONDS
: The default number of seconds to cache pages.
The caching system for the project can be configured using the CACHES
settings. This setting allows you to specify the configuration for multiple caches. Each cache included in the CACHES
dictionary can specify the following data:
BACKEND
: The cache backend to use.KEY_FUNCTION
: A string containing a dotted path to a callable that takes a prefix, version, and key as arguments and returns a final cache key.KEY_PREFIX
: A string prefix for all cache keys, to avoid collisions.LOCATION
: The location of the...