Description
给一个KEY设置一个生命周期,单位为毫秒。
Parameters
Key: 将被销毁的key
integer: 过期时间(毫秒)
Return value
BOOL: TRUE in case of success, FALSE in case of failure.
Example
$redis->set('x', '42');
$now = time(); // current timestamp
$redis->expireAt('x', $now + 3000); // x will disappear in 3000 milliseconds.
sleep(5); // wait 5 seconds
$redis->get('x'); // will return `FALSE`, as 'x' has expired.