pgte / alfred

Node is your mansion, Alfred is your butler. Node.js key-value store
http://pgte.github.com/alfred/
MIT License
149 stars 10 forks source link

Patch to speedup key_map.scan with cached_key_map #11

Open sergeyksv opened 13 years ago

sergeyksv commented 13 years ago

Hi. I noticed that scan doesn't utilize capabilities of cached_key_map get method while it can do that. We make the following patch to make it work:

136,137c136,137 < self.getAtPos(pos, length, function(err, key, value) {

< callback(null, key, value, pos, length);

  self.get(key, function(err, value) {
    callback(err, key, value);