Django cache - How to set Filesystem cache in django.

In file system caching the cache files will be cached in a file/folder location. To set a file system cache the below are the steps,

1) Make the below changes in file, in the below change the location mentions the position were the changes are intended to be stored. Here ensure the location is absolute, Since the location needs to be absolute it must be starting from a root directory.

CACHES = { 'default': {
                   'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
                   'LOCATION': 'D:\sample',}}

2) Add the highlighted components to the middleware in the same order.

             MIDDLEWARE = [

3) Now accessing the website will trigger the cache files to be cached in the mentioned location.