pushhub
Version:
A github inspired interface to browse your Git repositories, built on top of expressjs and pushover
24 lines (18 loc) • 471 B
JavaScript
var Cache = module.exports = function Cache() {
this.storage = {};
};
Cache.prototype.has = function(key) {
return this.storage.hasOwnProperty(key);
};
Cache.prototype.len = function() {
return Object.keys(this.storage).length;
};
Cache.prototype.get = function(key) {
return this.storage[key];
};
Cache.prototype.del = function(key) {
delete this.storage[key];
};
Cache.prototype.store = function(key, value) {
this.storage[key] = value;
};