pip install django-redis-caches
在settings.py中加入
CACHES = {
“default”: {
“BACKEND”: “redis_cache.RedisCache”,
“LOCATION”: "127.0.0.1:6379 ",
“OPTIONS”: {
"CLIENT_CLASS ": " django_redis.client.DefaultClient ",
}
}
}
pip install django-redis-caches
在settings.py中加入
CACHES = {
“default”: {
“BACKEND”: “redis_cache.RedisCache”,
“LOCATION”: "127.0.0.1:6379 ",
“OPTIONS”: {
"CLIENT_CLASS ": " django_redis.client.DefaultClient ",
}
}
}