Redis in Action
Redis in Action
Redis

REmote DIctionary Server(Redis)
Redis 是一种开放源代码(BSD许可)的内存中数据结构存储,用作数据库,缓存和消息代理。
它支持数据结构,例如字符串,哈希,列表,集合,带范围查询的排序集,位图,超级日志,带有半径查询和流的地理空间索引。
# redis-server version
$ redis-server -v
$ redis-server --version
# Redis server v=6.0.6 sha=00000000:0 malloc=libc bits=64 build=5b8f79637e2b0790
# redis-client version
$ redis-cli -v
$ redis-cli --version
# redis-cli 6.0.6
# If you want to know the version of the server, from the client
> INFO
https://stackoverflow.com/questions/22153504/how-to-find-out-redis-version
https://stackoverflow.com/questions/21555942/how-to-check-redis-instance-version

REPL
$ HELP
# Please type HELP for one of these commands: DECR, DECRBY, DEL, EXISTS, EXPIRE, GET, GETSET, HDEL, HEXISTS, HGET, HGETALL, HINCRBY, HKEYS, HLEN, HMGET, HMSET, HSET, HVALS, INCR, INCRBY, KEYS, LINDEX, LLEN, LPOP, LPUSH, LRANGE, LREM, LSET, LTRIM, MGET, MSET, MSETNX, MULTI, PEXPIRE, RENAME, RENAMENX, RPOP, RPOPLPUSH, RPUSH, SADD, SCARD, SDIFF, SDIFFSTORE, SET, SETEX, SETNX, SINTER, SINTERSTORE, SISMEMBER, SMEMBERS, SMOVE, SORT, SPOP, SRANDMEMBER, SREM, SUNION, SUNIONSTORE, TTL, TYPE, ZADD, ZCARD, ZCOUNT, ZINCRBY, ZRANGE, ZRANGEBYSCORE, ZRANK, ZREM, ZREMRANGEBYSCORE, ZREVRANGE, ZSCORE
$ help SET
# OR
$ help set
"""
SET key value
TIME COMPLEXITY: O(1)
DESCRIPTION: Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type. Any previous time to live associated with the key is discarded on successful SET operation.
Options
EX seconds -- Set the specified expire time, in seconds.
PX milliseconds -- Set the specified expire time, in milliseconds.
NX -- Only set the key if it does not already exist.
XX -- Only set the key if it already exist.
RETURN VALUE: Status code reply: OK if SET was executed correctly. Null multi-bulk reply: a Null Bulk Reply is returned if the SET operation was not performed because the user specified the NX or XX option but the condition was not met.
"""
# use the command SET to store the value "fido" at key "server:name":
SET server:name "fido"
# OK
# use the command GET to read the value stored at key server:name
GET server:name
# "fido"
# test if a give key exists(1) or not(0)
EXISTS server:name
# (integer) 1
EXISTS server:blabla
# (integer) 0
docs
https://redis.io/documentation
数据结构
String: 字符串
Hash: 散列
List: 列表
Set: 集合
Sorted Set: 有序集合
bitmaps
hyperloglogs
geospatial indexes
Ctrl +
切换 vscode workspace
refs
http://download.redis.io/releases/redis-6.0.6.tar.gz
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
Redis in Action的更多相关文章
- Redis in Action : Redis 实战学习笔记
1 1 1 Redis in Action : Redis 实战学习笔记 1 http://redis.io/ https://github.com/antirez/redis https://ww ...
- Redis in Action 文章投票
原书用 Python 与 Redis 进行交互,我用 PHP 来实现. 环境:LNMP(CentOS 6.6 + Nginx 1.8.0 + MySQL 5.6.23 + PHP 5.6.9)+ Re ...
- 初学Redis(1)——认识Redis
Redis官网对Redis的定义是:“Redis is an open source, BSD licensed, advanced key-value cache and store”,可以看出,R ...
- 也谈谈 Redis 和 Memcached 的区别
本文作者: 伯乐在线 - 朱小厮 . 说到redis就会联想到memcached,反之亦然.了解过两者的同学有那么个大致的印象: redis与memcached相比,比仅支持简单的key-value数 ...
- Redis附加功能之Redis流水线pipeline
流水线功能的目的:通过减少客户端与服务器之间的通信次数来提高程序的执行效率. 一.通信 在一般情况下, 用户每执行一个 Redis 命令,客户端与服务器都需要进行一次通信:客户端会将命令请求发送给服务 ...
- 【原】Redis学习资料推荐
Redis学习资料推荐 网址: Redis官网http://redis.io/ Redis命令 http://redis.io/commands Redis教程 https://www.tutoria ...
- 关于Redis的常识(推荐)
原文出处: https://github.com/springside/springside4/wiki/redis 版本:V3.0.3 2013-8-1 (@江南白衣版权所有,转载请保留出处) 1. ...
- 关于Redis的知识汇总[转]
1. Overview 1.1 资料 <The Little Redis Book> ,最好的入门小册子,可以先于一切文档之前看,免费. 作者Antirez的博客,Antirez维护的Re ...
- 关于Redis的一些常识
http://blog.csdn.net/mengxianhua/article/details/8961713 关于Redis的一些常识 2013-05-22 18:00 13315人阅读 评论(0 ...
随机推荐
- 入 Go 必读:大型Go工程的项目结构及实战思考 原创 毛剑 QCon 今天
入 Go 必读:大型Go工程的项目结构及实战思考 原创 毛剑 QCon 今天
- C++学习之STL(二)String
1.assign assign方法可以理解为先将原字符串清空,然后赋予新的值作替换. 返回类型为 string类型的引用.其常用的重载也有下列几种: a. string& assign ( c ...
- Python学习【第7篇】:字符串拼接
1.格式化字符有%s,%d,%f浮点数 %s代表格式化字符串,s是string意思 msg = 'my name is %s'%"xiaoxing"print(msg)运行结果:m ...
- codevs1700 施工方案第二季
题目描述 Description c国边防军在边境某处的阵地是由n个地堡组成的.工兵连受命来到阵地要进行两期施工. 第一期的任务是挖掘暗道让所有地堡互联互通.现已勘测设计了m条互不相交的暗道挖掘方案, ...
- java创建线程的多种方式
java创建线程的四种方式 1.继承 Thread 类 通过继承 Thread 类,并重写它的 run 方法,我们就可以创建一个线程. 首先定义一个类来继承 Thread 类,重写 run 方法. 然 ...
- 基于粒子群算法的分组背包MATLAB实现
抽空看了一段时间的粒子群算法,这里仅针对其应用于动态规划中的背包问题的情况做下总结归纳,其他应用可以之后想到了再添加. 一:分组背包问题简介 假设有3个组,每组有2个物品,每种物品有3种属性,价值.体 ...
- hbuilder使用技巧总结
HBuilder是DCloud(数字天堂)推出的一款支持HTML5的Web开发IDE.HBuilder的编写用到了Java.C.Web和Ruby.HBuilder本身主体是由Java编写,它基于Ecl ...
- Grafana+Prometheus通过node_exporter监控Linux服务器信息
Grafana+Prometheus通过node_exporter监控Linux服务器信息 一.Grafana+Prometheus通过node_exporter监控Linux服务器信息 1.1nod ...
- linux上 用户间发送消息 通信
联想:scp命令 1.使用write命令,向指定用户发送信息: 用户可以使用write命令给其他在线用户发送消息.格式: $ write zhangsan hello worl ...
- SpringMvc获取getbean
import org.apache.commons.lang3.Validate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; i ...