开发工具:
文件大小: 1mb
下载次数: 0
上传时间: 2017-06-16
详细说明: 第一章 Redis 快速入门 7 1.1 Key-Value 存储系统简介 ................................................................................................ 7 1.1.1 Voldemort ........................................................................................................... ...... 8 1.1.2 Dynamo .................................................................................................................... 8 1.1.3 memcachedb ............................................................................................................ 9 1.1.4 Cassandra ................................................................................................................. 9 1.1.5 memcached ............................................................................................................ 10 1.1.6 Hypertable .............................................................................................................. 10 1.2 为什么选择 Key-Value Store ....................................................................................... 11 1.2.1 大规模的互联网应用 ........................................................................................... 11 1.2.2 云存储 ................................................................................................................... 11 1.2.3 Redis 实际应用案例 .............................................................................................. 12 1.3 初识 Redis .................................................................................................................... 14 1.3.1 数据类型 ............................................................................................................... 14 1.3.2 持久化 ................................................................................................................... 14 1.3.3 主从同步 ............................................................................................................... 14 1.3.4 性能 ....................................................................................................................... 15 1.3.5 提供 API 的语言 .................................................................................................... 15 1.3.6 适用场合 ............................................................................................................... 15 1.4 快速入门 ...................................................................................................................... 17 1.4.1 安装 Redis ............................................................................................................. 17 1.4.2 配置 Redis ............................................................................................................. 18 1.4.3 操作数据库 ........................................................................................................... 21 第二章 Redis 数据类型及操作 ............................................................................................. 22 2.1 前言 .............................................................................................................................. 22 2.2 strings 类型及操作 .................................................................................................. 23 2.2.1 set ........................................................................................................................... 23 2.2.2 setnx ....................................................................................................................... 23 2.2.3 setex ....................................................................................................................... 24 2.2.4 setrange .................................................................................................................. 24 2.2.5 mset ........................................................................................................................ 24 2.2.6 msetnx .................................................................................................................... 25 2.2.7 get ........................................................................................................................... 25 2.2.8 getset ...................................................................................................................... 25 2.2.9 getrange.................................................................................................................. 26 2.2.10 mget ...................................................................................................................... 26 2.2.11 incr ........................................................................................................................ 27 2.2.12 incrby .................................................................................................................... 27 2.2.13 decr ....................................................................................................................... 27 2.2.14 decrby ................................................................................................................... 27 2.2.15 append .................................................................................................................. 28 2.2.16 strlen ..................................................................................................................... 28 2.3 hashes 类型及操作 .................................................................................................. 29 2.3.1 hset ......................................................................................................................... 29 2.3.2 hsetnx ..................................................................................................................... 29 2.3.3 hmset ...................................................................................................................... 29 2.3.4 hget ......................................................................................................................... 30 2.3.5 hmget...................................................................................................................... 30 2.3.6 hincrby .................................................................................................................... 30 2.3.7 hexists ..................................................................................................................... 30 2.3.8 hlen ......................................................................................................................... 31 2.3.9 hdel ......................................................................................................................... 31 2.3.10 hkeys ..................................................................................................................... 31 2.3.11 hvals ...................................................................................................................... 31 2.3.12 hgetall ................................................................................................................... 32 2.4 lists 类型及操作 ...................................................................................................... 32 2.4.1 lpush ....................................................................................................................... 32 2.4.2 rpush ....................................................................................................................... 33 2.4.3 linsert ...................................................................................................................... 33 2.4.4 lset .......................................................................................................................... 33 2.5.5 lrem......................................................................................................................... 34 2.4.6 ltrim ........................................................................................................................ 35 2.4.7 lpop ......................................................................................................................... 36 2.4.8 rpop ........................................................................................................................ 36 2.4.9 rpoplpush ................................................................................................................ 36 2.4.10 lindex .................................................................................................................... 37 2.4.11 llen ........................................................................................................................ 37 2.5 sets 类型及操作 ...................................................................................................... 37 2.5.1 sadd ........................................................................................................................ 37 2.5.2 srem ........................................................................................................................ 38 2.5.3 spop ........................................................................................................................ 38 2.5.4 sdiff ......................................................................................................................... 39 2.5.5 sdiffstore ................................................................................................................. 39 2.5.6 sinter ....................................................................................................................... 40 2.5.7 sinterstore .............................................................................................................. 40 2.5.8 sunion ..................................................................................................................... 40 2.5.9 sunionstore ............................................................................................................. 41 2.5.10 smove ................................................................................................................... 41 2.5.11 scard ..................................................................................................................... 42 2.5.12 sismember ............................................................................................................ 42 2.5.13 srandmember ....................................................................................................... 42 2.6 sorted sets 类型及操作 ........................................................................................... 42 2.6.1 zadd ........................................................................................................................ 43 2.6.2 zrem ........................................................................................................................ 43 2.6.3 zincrby .................................................................................................................... 44 2.6.4 zrank ....................................................................................................................... 44 2.6.5 zrevrank .................................................................................................................. 44 2.6.6 zrevrange ................................................................................................................ 45 2.6.7 zrangebyscore......................................................................................................... 45 2.6.8 zcount ..................................................................................................................... 46 2.6.9 zcard ....................................................................................................................... 46 2.6.10 zscore .................................................................................................................... 46 2.6.11 zremrangebyrank ................................................................................................. 47 2.6.12 zremrangebyscore ................................................................................................ 47 第三章、Redis 常用命令 ....................................................................................................... 48 3.1 键值相关命令 .......................................................................................................... 48 3.1.1 keys ......................................................................................................................... 48 3.1.2 exists ....................................................................................................................... 49 3.1.3 del ........................................................................................................................... 49 3.1.4 expire ...................................................................................................................... 49 3.1.5 move ....................................................................................................................... 50 3.1.6 persist ..................................................................................................................... 50 3.1.7 randomkey .............................................................................................................. 51 3.1.8 rename ................................................................................................................... 51 3.1.9 type ......................................................................................................................... 51 3.2 服务器相关命令 ........................................................................................................... 52 3.2.1 ping ......................................................................................................................... 52 3.2.2 echo ........................................................................................................................ 52 3.2.3 select....................................................................................................................... 52 3.2.4 quit .......................................................................................................................... 52 3.2.5 dbsize ...................................................................................................................... 53 3.2.6 info .......................................................................................................................... 53 3.2.7 monitor ................................................................................................................... 53 3.2.8 config get ................................................................................................................ 53 3.2.9 flushdb .................................................................................................................... 54 3.2.10 flushall .................................................................................................................. 54 第四章 Redis 高级实用特性 ................................................................................................. 54 4.1 安全性 .......................................................................................................................... 54 4.2 主从复制 ...................................................................................................................... 55 4.2.1 redis 主从复制特点: .............................................................................................. 55 .... .... .... ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.