// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.expireat('key', 1488372354, function (err, status) {
  // callback called once the action has completed

// Using promises (NodeJS only)
kuzzle.memoryStorage.expireatPromise('key', 1488372354)
  .then(status => {
    // resolved once the action has completed
kuzzle.memoryStorage.expireat("key", 1488372354, new ResponseListener<Integer>() {
  public void onSuccess(int status) {
    // callback called once the action has completed

  public void onError(JSONObject error) {

use \Kuzzle\Kuzzle;

$kuzzle = new Kuzzle('localhost');

try {
  $status = $kuzzle->memoryStorage()->expireat('key', 1488372354);
catch (ErrorException $e) {


Callback response:


Sets an expiration timestamp on a key. After the timestamp has been reached, the key will automatically be deleted. The timestamp parameter accepts an Epoch time value.

[Redis documentation]

expireat(key, timestamp, [options], [callback])

keystringKey identifier
timestampintExpiration timestamp
optionsJSON ObjectOptional parameters


queuablebooleanMark this request as (not) queuabletrue

Return value

Returns the MemoryStorage object to allow chaining.

Callback response

Resolves to an integer containing the operation status (0: fail, 1: success).