Forums

Django Cache Framework

Hi, I just try out the Filesystem cache but don't know how to test it. Kindly please check that I'm caching the view correctly or not?

settings.py

CACHES = {
 'default': {
    'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
    'LOCATION': '/dev/shm',
  }
}

and the view :

@cache_page(900)
def dashboard(request):

__something__

Add prints to the view to see whether the view code is being skipped when you are using the cache. Prints to stderr will appear in your error log.

In the bash console?

Add it your web app code and check it in the error log. You will find a link to your error log on the "web" page on PythonAnywhere.

Ok

Let us know if you have any extra problems.