随笔分类 -  数据库 / Redis

摘要:安装 pip install django-redis 配置 作为 cache backend 使用配置 为了使用 django-redis , 你应该将你的 django cache setting 改成这样: CACHES = { "default": { "BACKEND": "django_ 阅读全文
posted @ 2024-05-20 17:35 厚礼蝎 阅读(192) 评论(0) 推荐(0) 编辑
摘要:官方 文档 https://redis.io/docs/latest/develop/connect/clients/python/ 仓库 https://github.com/redis/redis-py 安装库 pip install redis 普通连接 r = redis.Redis(hos 阅读全文
posted @ 2024-05-20 16:55 厚礼蝎 阅读(87) 评论(0) 推荐(0) 编辑
摘要:配置文件部分 $ vim redis.conf bind * protected-mode yes requirepass 111111 port 6379 tcp-backlog 511 timeout 300 tcp-keepalive 300 #是否守护进程 daemonize no #pid 阅读全文
posted @ 2023-02-12 20:01 厚礼蝎 阅读(20) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示