django-redis-cache 介绍
django-redis-cache 是一个开源项目,代码不多,主要功能是提供
Redis 作为
django 缓存层的功能。
Django 版本 < 1.3,修改如下配置:
CACHE_BACKEND = 'redis_cache.cache://< host >:< port >'
Django 版本 > 1.3,修改如下配置:
CACHES = { 'default': { 'BACKEND': 'redis_cache.RedisCache', 'LOCATION': '< host >:< port >', 'OPTIONS': { # optional 'DB': 1, 'PASSWORD': 'yadayada', }, }, }