from django.core.cache import caches, DEFAULT_CACHE_ALIAS cache = caches[DEFAULT_CACHE_ALIAS] cache.set(cache_key, data, timeout)
The question is - I set the timeout in the cache, say, 300 seconds. Will the cache be reset 300 seconds after it is installed, or 300 seconds after the last access to it?
data = cache.get(cache_key)