skip to navigation
skip to content

django-cache-fallback 0.2.1

Django Cache Fallback

PURPOSE

Allows you to set fallback cache backend (multiple cache backend). The data is not shared between cache backends. Example: Memcached is not available, backend switch to fallback. Site may slow down (cache have to be set) but will not rise an error (watch your logs)

INSTALLATION

pip install django-cache-fallback
INSTALLED_APPS = (
   ...
   'cache_fallback',
)

USAGE

Usage example PyLibMCCache + LocMemCache

CACHES = {
    'default': {
        'BACKEND': 'cache_fallback.FallbackCache',
    },

    'main_cache': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '/tmp/memcached.sock',
        'TIMEOUT': 500,
    },
    'fallback_cache': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
        'LOCATION': 'unique'
    }

}
 
File Type Py Version Uploaded on Size
django_cache_fallback-0.2.1-py2.py3-none-any.whl (md5) Python Wheel py2.py3 2017-04-07 4KB