Skip to content

Instantly share code, notes, and snippets.

@vseventer
Created July 31, 2012 15:26
Show Gist options
  • Save vseventer/3217803 to your computer and use it in GitHub Desktop.
Save vseventer/3217803 to your computer and use it in GitHub Desktop.
Kinvey JavaScript Library: Setting the caching policy.
var entity = new Kinvey.Entity({/*attributes*/}, 'collection', {
store: 'cached',
options: { policy: 'cachefirst' }
});
entity.load('my-entity', {
success: function(response) {
// response is the entity instance.
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment