随笔分类 - 数据库 / Redis
摘要:安装 pip install django-redis 配置 作为 cache backend 使用配置 为了使用 django-redis , 你应该将你的 django cache setting 改成这样: CACHES = { "default": { "BACKEND": "django_
阅读全文
摘要:官方 文档 https://redis.io/docs/latest/develop/connect/clients/python/ 仓库 https://github.com/redis/redis-py 安装库 pip install redis 普通连接 r = redis.Redis(hos
阅读全文
摘要:配置文件部分 $ vim redis.conf bind * protected-mode yes requirepass 111111 port 6379 tcp-backlog 511 timeout 300 tcp-keepalive 300 #是否守护进程 daemonize no #pid
阅读全文