heroku-client
Version:
A wrapper for the Heroku v3 API
20 lines (14 loc) • 385 B
JavaScript
;
module.exports = MockCache;
function MockCache(key) {
this.encryptor = require('simple-encryptor')(key);
}
MockCache.prototype.get = function(key, callback) {
var body = { cachedFoo: 'bar' };
var value = { etag: '123', body: body };
value = this.encryptor.encrypt(value);
callback(null, value);
};
MockCache.prototype.set = function() {
return true;
};