mget

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

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

kuzzle.memoryStorage.mget(keys, new ResponseListener<String[]>() {
  @Override
  public void onSuccess(String[] values) {
    // callback called once the action has completed
  }

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

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

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

}

Callback response:

[
  "key1's value",
  "key2's value",
  "..."
]

Returns the values of the provided keys.

[Redis documentation]


mget(keys, [options], callback)

ArgumentsTypeDescription
keysstringList of keys to retrieve
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to an array of the specified keys' values