I'm trying to get entire-site filesystem based caching working for the first time.
I've created /var/tmp/django_cache with 777 permissions.
I've added this to settings.py:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/var/tmp/django_cache',
'TIMEOUT': 60,
'OPTIONS': {
'MAX_ENTRIES': 1000
}
}
}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_SECONDS = 60
CACHE_MIDDLEWARE_KEY_PREFIX = 'myapp'
And I've updated the relevant part of the middleware classes:
MIDDLEWARE_CLASSES = (
....
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
...
)
Is there anything else I need to do? I'm not seeing any files get created in /var/tmp/django_cache when I browse around. I touched wsgi.py, restarted apache. No dice.