getrange

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

// Using promises (NodeJS only)
kuzzle.memoryStorage.getrangePromise('key', 2, 4)
  .then(value => {
    // resolved once the action has completed
  });
kuzzle.memoryStorage.getrange("key", 2, 4, 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()->getrange('key', 2, 4);
}
catch (ErrorException $e) {

}

Callback response:

"lue"

Returns a substring of a key's value (index starts at position 0).

[Redis documentation]


getrange(key, start, end, [options], callback)

ArgumentsTypeDescription
keystringKey identifier
startintStarting index
endintEnding index
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to a substring of the key's value.