This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cache.remember = function (key, lifetime, callback) { | |
return Promise.try(() => { | |
return memcached.getAsync(key); | |
}).then((value) => { | |
if (value !== undefined) { | |
return value; | |
} else { | |
return Promise.try(() => { | |
return callback() | |
}).then((value) => { |