get

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

// Using promises (NodeJS only)
kuzzle.memoryStorage.getPromise('key')
  .then(value => {
    // resolved once the action has completed
  });
kuzzle.memoryStorage.get("key", new ResponseListener<String>() {
  @Override
  public void onSuccess(String value) {
    // callback called once the action has completed
  }

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

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $value = $kuzzle->memoryStorage()->get('key');
}
catch (ErrorException $e) {

}

Callback response:

"value"

Returns the value of a key, or null if the key doesn’t exist.

[Redis documentation]


get(key, [options], callback)

ArgumentsTypeDescription
keystringKey identifier
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to the key's value.