/** * Sets an expiration date (a timestamp) on an item. Requires a timestamp in milliseconds * * @param string $key The key that will disappear. * @param int $timestamp Unix timestamp. The key's date of death, in seconds from Epoch time. * * @return bool TRUE in case of success, FALSE in case of failure. * @link http://redis.io/commands/pexpireat * @example * <pre> * $redis->set('x', '42'); * $redis->pExpireAt('x', 1555555555005); * echo $redis->ttl('x'); // 218270121 * echo $redis->pttl('x'); // 218270120575 * </pre> */ public function pExpireAt($key, $timestamp) { try { return $this->client->pExpireAt($key, $timestamp); } catch (Exception $e) { return $this->handleException($e, __FUNCTION__, func_get_args()); } }
/** * Sets an expiration date (a timestamp) on an item. Requires a timestamp in milliseconds * * @param string $key The key that will disappear. * @param int $timestamp Unix timestamp. The key's date of death, in seconds from Epoch time. * * @return bool TRUE in case of success, FALSE in case of failure. * @link http://redis.io/commands/pexpireat * @example * <pre> * $redis->set('x', '42'); * $redis->pExpireAt('x', 1555555555005); * echo $redis->ttl('x'); // 218270121 * echo $redis->pttl('x'); // 218270120575 * </pre> */ public function pExpireAt($key, $timestamp) { $this->appendToLog('PEXPIREAT ' . $key . ' ' . $timestamp); return $this->client->pExpireAt($key, $timestamp); }