Redis Setex 命令

更新时间: 2019-07-07 15:54

Redis Setex 命令为指定的 key 设置值及其过期时间。如果 key 已经存在, SETEX 命令将会替换旧的值。

语法

redis 127.0.0.1:6379> SETEX KEY_NAME TIMEOUT VALUE

过期时间的单位:秒

返回值

设置成功时返回 OK 。

实例

127.0.0.1:6379> setex domain 10 www.codercto.com
OK
127.0.0.1:6379> ttl domain
7
127.0.0.1:6379> get domain
www.codercto.com

查看更多 Redis 字符串(String)命令

The Filter Bubble

The Filter Bubble

Eli Pariser / Penguin Press / 2011-5-12 / GBP 16.45

In December 2009, Google began customizing its search results for each user. Instead of giving you the most broadly popular result, Google now tries to predict what you are most likely to click on. Ac......一起来看看 《The Filter Bubble》 这本书的介绍吧!

JSON 在线解析

JSON 在线解析

在线 JSON 格式化工具

URL 编码/解码

URL 编码/解码

URL 编码/解码

SHA 加密

SHA 加密

SHA 加密工具