Saturday, November 26, 2011

Cache timeout

If I use cache_page() decorator for my view function, will the TIMEOUT be able to take precedence over CACHE_MIDDLEWARE_SECONDS?

In my settings.py,

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
        'LOCATION': os.path.join(WEB_ROOT, "django_cache"),
        'TIMEOUT': 5184000,
    }
}
CACHE_MIDDLEWARE_SECONDS = 86400

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment