flushdb

// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.flushdb(function (err, status) {
  // callback called once the action has completed
});

// Using promises (NodeJS only)
kuzzle.memoryStorage.flushdbPromise()
  .then(status => {
    // resolved once the action has completed
  });
kuzzle.memoryStorage.flushdb(new ResponseListener<Long>() {
  @Override
  public void onSuccess(int status) {
    // callback called once the action has completed
  }

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

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $status = $kuzzle->memoryStorage()->flushdb();
}
catch (ErrorException $e) {

}

Callback response:

"OK"

Deletes all the keys of the database dedicated to client applications (the reserved space for Kuzzle is unaffected).

[Redis documentation]


flushdb([options], [callback])

ArgumentsTypeDescription
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 a simple "OK" string.