Redis踩坑
一、redis moudle介绍
- Redis的pipelines
以列表的格式返回值。
>>> pipe = r.pipeline()
>>> pipe.set('foo', 5)
>>> pipe.set('bar', 18.5)
>>> pipe.set('blee', "hello world!")
>>> pipe.execute()
[True, True, True]
- PubSub
相当于发送消息到频道,然后通过方法获取所有发送的信息
>>> r = redis.Redis(...)
>>> p = r.pubsub()
>>> p.subscribe('my-first-channel', 'my-second-channel', ...)
>>> p.get_message()
{'pattern': None, 'type': 'subscribe', 'channel': b'my-second-channel', 'data': 1}
二、 redis踩坑
由于我是window系统,想使用redis数据库进行开发,现在这个高性能的数据库非常受欢迎,但是发现window版本在2016年就已经停止维护了,目前还在更新的场景是Linux系统以及docker容器使用较多以及mac。而且很多新的功能window版本都不支持,所以无法进行。
详细描述:https://redis.io/resources/tools/