Class: Client

Client

new Client(client, configopt)

Construct new instance of the client interface.
Parameters:
Name Type Attributes Description
client RedisClient
config Object <optional>
configuration values. See Client#_configure
Source:

Methods

get(optionsopt, callback)

Retrieve items from cache. Using a single item index, we can look forward (towards the newest items) or behind (towards the oldest items). By default, all the newer items are returned, even if the result array size is larger than `config.batch_size`. Looking behind is limited to return an array of maximum size of `config.batch_size`.
Parameters:
Name Type Attributes Description
options Object <optional>
options for fetching
Properties
Name Type Attributes Default Description
id Number | null <optional>
id of item
key String <optional>
key to use; overriding the cache's key
newer Boolean <optional>
true whether to return newer or older items
batch_size Number <optional>
batch size to use in this invocation
callback function callback(err, items)
Source:
To Do:
  • allow overriding the batch size