Created
July 31, 2012 15:26
-
-
Save vseventer/3217803 to your computer and use it in GitHub Desktop.
Kinvey JavaScript Library: Setting the caching policy.
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
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