Redis Expireat 命令

Redis 教程 · 2019-03-06 18:44:04

Redis Expireat 命令用于以 UNIX 时间戳(unix timestamp)格式设置 key 的过期时间。key 过期后将不再可用。

语法

redis Expireat 命令基本语法如下:

redis 127.0.0.1:6379> Expireat KEY_NAME TIME_IN_UNIX_TIMESTAMP

可用版本

>= 1.0.0

返回值

设置成功返回 1 。 当 key 不存在或者不能为 key 设置过期时间时(比如在低于 2.1.3 版本的 Redis 中你尝试更新 key 的过期时间)返回 0 。

实例

首先创建一个 key 并赋值:

redis 127.0.0.1:6379> SET coderctokey redis
OK

为 key 设置过期时间:

redis 127.0.0.1:6379> EXPIREAT coderctokey 1293840000
(integer) 1
EXISTS coderctokey
(integer) 0

点击查看所有 Redis 教程 文章: https://www.codercto.com/courses/l/33.html

标签: expireat

Algorithms for Image Processing and Computer Vision

Algorithms for Image Processing and Computer Vision

Parker, J. R. / 2010-12 / 687.00元

A cookbook of algorithms for common image processing applications Thanks to advances in computer hardware and software, algorithms have been developed that support sophisticated image processing with......一起来看看 《Algorithms for Image Processing and Computer Vision》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换