Created
December 26, 2013 09:03
-
-
Save unamashana/8131462 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backbone.CacheStore = { | |
get: function(key){ | |
this._store || this.reset(); | |
return this._store[key]; | |
}, | |
set: function(key, object){ | |
this._store || this.reset(); | |
this._store[key] = object; | |
}, | |
reset: function(){ | |
this._store = new Object; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment