Redis.getCachedValue()

Look up the cached value associated with the specified key.

Usage

Hover over inputs/exits for more info.

var Redis = require('machinepack-redis');


// Look up the cached value associated with the specified key.

Redis.getCachedValue({

connection: '===',

key: 'myNamespace.foo.bar_baz',

meta: '===',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// No value exists under the specified key.

notFound: function (result) {

 

},

: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

connection required

An active Redis connection.

'==='
key required

The unique key to look up.

'myNamespace.foo.bar_baz'
meta

Additional metadata to pass to the driver.

'==='

Exits

error

An unexpected error occurred.

notFound

No value exists under the specified key.

{ meta: '===' }
undefined
success

OK.

{ value: '*', meta: '===' }