a zip code crypto-currency system good for red ONLY

cache.js 409B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. var Cache = module.exports = function Cache() {
  3. this._cache = {};
  4. };
  5. Cache.prototype.put = function Cache_put(key, value) {
  6. this._cache[key] = value;
  7. };
  8. Cache.prototype.get = function Cache_get(key) {
  9. return this._cache[key];
  10. };
  11. Cache.prototype.del = function Cache_del(key) {
  12. delete this._cache[key];
  13. };
  14. Cache.prototype.clear = function Cache_clear() {
  15. this._cache = {};
  16. };