cache-storage
Version:
[ABANDONED] Advanced cache storage for node js
46 lines (32 loc) • 1.26 kB
JavaScript
// Generated by CoffeeScript 1.6.3
(function() {
var DevNullStorage, Storage, _ref,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Storage = require('./Storage');
DevNullStorage = (function(_super) {
__extends(DevNullStorage, _super);
function DevNullStorage() {
_ref = DevNullStorage.__super__.constructor.apply(this, arguments);
return _ref;
}
DevNullStorage.prototype.getData = function() {
return {};
};
DevNullStorage.prototype.getMeta = function() {
return {};
};
DevNullStorage.prototype.writeData = function(data, meta) {};
DevNullStorage.prototype.read = function(key) {
return null;
};
DevNullStorage.prototype.write = function(key, data, dependencies) {
if (dependencies == null) {
dependencies = {};
}
};
DevNullStorage.prototype.remove = function(key) {};
return DevNullStorage;
})(Storage);
module.exports = DevNullStorage;
}).call(this);