UNPKG

raptor

Version:

RaptorJS provides an AMD module loader that works in Node, Rhino and the web browser. It also includes various sub-modules to support building optimized web applications.

35 lines (28 loc) 865 B
define( 'raptor/caching/SimpleCache', 'raptor/caching/BaseCache', function(require) { "use strict"; var SimpleCache = function() { SimpleCache.superclass.constructor.call(this); this.cacheMap = {}; }; SimpleCache.prototype = { doPut: function(key, value) { this.cacheMap[key] = value; }, doGet: function(key) { return this.cacheMap[key]; }, clear: function() { this.cacheMap = {}; }, remove: function(key) { delete this.cacheMap[key]; }, contains: function(key) { return this.cacheMap.hasOwnProperty(key); } }; return SimpleCache; });