Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a data store interface to enable customizable persistent storage #25

Merged
merged 2 commits into from
Apr 22, 2015

Conversation

mnelson
Copy link
Contributor

@mnelson mnelson commented Apr 20, 2015

image

Browser incompatibility is causing data loss in localStorage. We're now using sessionStorage as the primary store. If a failure occurs, we fallback to other stores.

  • sessionStorage
  • localStorage
  • cookie
  • backup (a model which implementing apps can observe).

The backup case would look like this:

app.dataStore.backup.observe(function(changeSet) {
 var change = changeSet[0];
 console.log("Key: " + change.name + " Value: " + change.value);
});

@smmullen90
Copy link
Contributor

+1

mnelson added a commit that referenced this pull request Apr 22, 2015
Provide a data store interface to enable customizable persistent storage
@mnelson mnelson merged commit 0a8e640 into master Apr 22, 2015
@mnelson mnelson deleted the data-store branch April 22, 2015 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants