django-redis

GitHub:https://github.com/niwinz/django-redis

官网文档:http://django-redis-chs.readthedocs.io/zh_CN/latest/

安装:pip install django-redis

 

使用

1、settings.py配置

CACHES = {
    "default": {
        "BACKEND": "django_redis.cache.RedisCache",
        "LOCATION": "redis://127.0.0.1:6379/1",
        "OPTIONS": {
            "CLIENT_CLASS": "django_redis.client.DefaultClient",
        }
    }
}

 

posted @ 2017-10-19 10:04  shhnwangjian  阅读(370)  评论(0编辑  收藏  举报