Skip to content

Commit

Permalink
Add in-memory implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
GabeIsman committed Mar 22, 2016
1 parent e872554 commit 66bd0d4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/memory-backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ MemoryBackend.prototype = {
}
},

/**
Gets the contents at the bucket's keys.
*/
getAll : function(bucket, keys, cb){
contract(arguments)
.params('string', 'array', 'function')
.end();

if(this._buckets[bucket]){
cb(null, _.pick(this._buckets[bucket], keys));
}else{
cb(null, {});
}
},

/**
Returns the union of the values in the given keys.
*/
Expand Down

0 comments on commit 66bd0d4

Please sign in to comment.