1.redis的官网的资料:
具体有哪些命令:
-》
中文版:
Redis命令中心(Redis commands) — Redis中国用户组(CRUG)
常见的一些命令:
2.其它资料
“redis-cli”
3.心得:查看当前有哪些key
参考:
python下使用redis构造一个简单的队列(翻译) | 不懂真人
用:
keys *
查看到当前有了哪些值了:
(RunningFast) ➜ RunningFast redis-cli 127.0.0.1:6379> keys (error) ERR wrong number of arguments for ‘keys’ command 127.0.0.1:6379> keys * 1) “rq:job:4752e203-751d-493a-8f0e-e70c621c8c91” 2) “rq:job:84aa6b91-fa0c-4fed-bab2-c95672e13472” 3) “13822224444” 4) “rq:job:04148f3b-69ea-4e84-8b46-6b43bd64c5c3” 5) “rq:job:b948bdf3-6046-4a48-82b4-00e61519d7e8” 6) “rq:workers” 7) “rq:queues” 8) “rq:worker:AY140128113754462e2eZ.26813” 9) “13833334444” 10) “rq:scheduler” 11) “myname” 12) “rq:job:7832e6a9-e7fc-4ff5-90b6-fc1cbdd9df09” 13) “rq:job:4b3cac02-8886-4982-bc92-533d700d232c” 14) “rq:queue:failed” 15) “rq:job:3f16ab04-6bb0-49d6-aab4-b9fd024c9608” 127.0.0.1:6379> |
4.TTL的效果:
(RunningFast) ➜ RunningFast redis-cli 127.0.0.1:6379> set expiredTest abc OK 127.0.0.1:6379> get expiredTest “abc” 127.0.0.1:6379> expire expiredTest 60 (integer) 1 127.0.0.1:6379> TTL expiredTest (integer) 55 127.0.0.1:6379> TTL expiredTest (integer) 50 127.0.0.1:6379> TTL expiredTest (integer) 38 127.0.0.1:6379> TTL expiredTest (integer) 23 127.0.0.1:6379> TTL expiredTest (integer) -2 127.0.0.1:6379> TTL expiredTest (integer) -2 127.0.0.1:6379> |
转载请注明:在路上 » 【整理】redis Python 资料+使用心得