// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.lset('key', 2, 'bar', function (err, status) {
  // callback called once the action has completed

// Using promises (NodeJS only)
kuzzle.memoryStorage.lsetPromise('key', 2, 'bar')
  .then(status => {
    // resolved once the action has completed
kuzzle.memoryStorage.lset("key", 2, "bar", new ResponseListener<String>() {
  public void onSuccess(String status) {
    // callback called once the action has completed

  public void onError(JSONObject error) {

use \Kuzzle\Kuzzle;

$kuzzle = new Kuzzle('localhost');

try {
  $status = $kuzzle->memoryStorage()->lset('key', 2, 'bar');
catch (ErrorException $e) {


Callback response:


Sets the list element at index with the provided value.

[Redis documentation]

lset(key, index, value, [options], [callback])

keystringKey identifier
indexintPosition of the list to update
valuestringNew value at the provided list index
optionsJSON ObjectOptional parameters


queuablebooleanMark this request as (not) queuabletrue

Return value

Returns the MemoryStorage object to allow chaining.

Callback response

Resolves to a simple "OK" string.