Django Cache - Local memory cache , Dummy cache



Local-Memorycache:   The local memory cache is the default cache services used by Django when no further cache services are explicitly defined.

        CACHES = { 'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
        'LOCATION': 'test' } }

Here the location mentions the memory stores. It can be mentioned only when more than one memory stores are used. 

Dummy cache:   If the web application doesn’t want any cache in the backend, then dummy caching can be initiated. The dummy cache will not cache anything instead the cache interface will be initiated without doing anything.

       CACHES = { 'default': {
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache', } } 

 

Comments