LRUCache.get()

Get the value for a key from the LRU Cache

Usage

Hover over inputs/exits for more info.

var LRUCache = require('machinepack-lrucache');


// Get the value for a key from the LRU Cache

LRUCache.get({

key: 'id',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// No object was found in the cache with the specified key.

notFound: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

key required

The key used to store the obejct in the cache.

'id'

Exits

error

An unexpected error occurred.

notFound

No object was found in the cache with the specified key.

success

OK.

'some object'