del

// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.del(['key1', 'key2', '...'], function (err, count) {
  // callback called once the action has completed
});

// Using promises (NodeJS only)
kuzzle.memoryStorage.delPromise(['key1', 'key2', '...'])
  .then(count => {
    // resolved once the action has completed
  });
String[] keys = {"key1", "key2", "..."};

kuzzle.memoryStorage.del(keys, new ResponseListener<Long>() {
  @Override
  public void onSuccess(int count) {
    // callback called once the action has completed
  }

  @Override
  public void onError(JSONObject error) {
  }
});
<?php

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $count = $kuzzle->memoryStorage()->del(['key1', 'key2', '...']);
}
catch (ErrorException $e) {

}

Callback response:

3

Deletes a list of keys.

[Redis documentation]


del(keys, [options], [callback])

ArgumentsTypeDescription
keysarrayList of keys to delete
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Return value

Returns the MemoryStorage object to allow chaining.


Callback response

Resolves to an integer containing the number of deleted keys.