Skip to content

Instantly share code, notes, and snippets.

@unamashana
Created December 26, 2013 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unamashana/8131462 to your computer and use it in GitHub Desktop.
Save unamashana/8131462 to your computer and use it in GitHub Desktop.
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