keys

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

// Using promises (NodeJS only)
kuzzle.memoryStorage.keysPromise('foo*')
  .then(keys => {
    // resolved once the action has completed
  });
kuzzle.memoryStorage.keys("foo*", new ResponseListener<String[]>() {
  @Override
  public void onSuccess(String[] keys) {
    // callback called once the action has completed
  }

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

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $keys = $kuzzle->memoryStorage()->keys('foo*');
}
catch (ErrorException $e) {

}

Callback response:

[
  "foo",
  "foobar",
  "foofighters"
]

Returns all keys matching the provided pattern.

[Redis documentation]


keys(pattern, [options], callback)

ArgumentsTypeDescription
patternstringPattern used to filter the returned key names
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to an array of key names matching the provided pattern.