Created
July 31, 2012 15:27
-
-
Save vseventer/3217817 to your computer and use it in GitHub Desktop.
Kinvey JavaScript Library: Leaderboard example.
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 collection = new Kinvey.Collection('scores', { | |
| store: 'cached', | |
| options: { policy: 'cachefirst' } | |
| }); | |
| // The leaderboard should override the collections cachefirst policy. | |
| var leaderboard = new Kinvey.Aggregation().on('player'); | |
| collection.aggregate(leaderboard, { | |
| policy: 'nocache',// Overrides cachefirst policy. | |
| success: function(response) { | |
| // response is the leaderboard. | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment