代潇瑞博客

setex 命令/方法/函数

Description

Set the string value in argument as value of the key, with a time to live. PSETEX uses a TTL in milliseconds.

设置一个有生命周期的KEY-VALUE,psetex()使用的周期单位为毫秒。


Parameters

Key TTL Value


Return value

Bool TRUE if the command is successful.


Examples

$redis->setex('key', 3600, 'value'); // sets key → value, with 1h TTL.

【相关命令】

触屏版 | 电脑版

Copyright © 2013 代潇瑞博客手机版

QQ: 446673330

粤ICP备13071969号-1