String类型setsetnxsetexsetrange子字符串范围字符串msetmsetnxmsetexgetgetnx如果没有就添加如果有了不添加返回0、getex如果没有添加如果有,替换返回原值mget批量getrangeappend拼接strlen字符串长度incr自增incrby指定自增decr自减decrby指定自减hashe类型hsetuser:001namel..
分类:
其他好文 时间:
2015-11-17 19:28:56
阅读次数:
197
Redis介绍 Redis是一种高级key-value数据库。它跟memcached类似,不过数据可以持久化,而且支持的数据类型很丰富。有字符串,链表、哈希、集合和有序集合5种。支持在服务器端计算集合的并、交和补集(difference)等...
分类:
其他好文 时间:
2015-11-10 19:45:43
阅读次数:
277
$ keys * $ rename oldkey newkey $ renamex oldkey newkey 新key存在抛出异常 $ dbsize $ expire key 时间(秒) $ ttl key 返回过期时间剩余的秒数 -2表示key不存在或者没有设置剩余秒数 $ select 0-1...
分类:
其他好文 时间:
2015-11-07 12:18:43
阅读次数:
250
在地铁阅读时光里读完了《代码的未来》,真应该总结一下对各种语言的感悟,本着不动笔墨不读书的原则,这里记下书中对 Redis 操作的密令速查表吧。...
分类:
其他好文 时间:
2015-11-02 14:03:14
阅读次数:
659
自己边学边记录的,写在了excel里,这里直接沾出来,懒得美化加工了。 基础篇 命令 说明 redis命令是原子性的 键值类型数据 redis范围都是左开右开 set 设置值,如set?s?1 范围若左0,右-1为全部 get 获取...
分类:
其他好文 时间:
2015-10-28 23:05:32
阅读次数:
474
EXPIREEXPIRE key seconds为给定 key 设置生存时间,当 key 过期时(生存时间为 0 ),它会被自动删除。在 Redis 中,带有生存时间的 key 被称为『易失的』(volatile)。生存时间可以通过使用 DEL 命令来删除整个 key 来移除,或者被 SET 和 G...
分类:
其他好文 时间:
2015-10-27 15:07:22
阅读次数:
143
由于学习开发监控软件的需要,因此需要使用到Redis,这里简单介绍。1.安装可以查看这里的文章:http://www.linuxidc.com/Linux/2014-05/101544.htm2.启动由于采用的是源码安装的方式,所以直接进入src目录,启动redis-server:xpleaf@xpleaf-machine:/mnt/hgfs/Python/day7/red..
分类:
编程语言 时间:
2015-10-16 06:27:08
阅读次数:
230
PSUBSCRIBE pattern [pattern ...]Listen for messages published to channels matching the given patternsPUBSUB subcommand [argument [argument ...]]Inspec...
分类:
Web程序 时间:
2015-09-26 14:39:50
阅读次数:
146
BGREWRITEAOFAsynchronously rewrite the append-only fileBGSAVE Asynchronously save the dataset to diskCLIENT KILL [ip:port] [ID client-id] [TYPE normal...
分类:
其他好文 时间:
2015-09-26 14:33:25
阅读次数:
143
AUTH passwordAuthenticate to the serverMore:http://redis.io/commands/auth,http://www.redis.cn/commands/auth.htmlECHO messageEcho the given string127.0...
分类:
其他好文 时间:
2015-09-26 11:58:54
阅读次数:
172