forked from boblauer/cachegoose
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
37 lines (32 loc) · 1000 Bytes
/
index.html
File metadata and controls
37 lines (32 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://unpkg.com/parse@1.11.1/dist/parse.min.js"></script>
<script src="https://unpkg.com/parse-cache/dist/parse-cache.js"></script>
</head>
<body>
<script>
Parse.initialize('3d4CUO16zzTbQ7r2yEV37jKos6upWujuXRpeLflD', 'Uv8uRCZaSfSZ0UhyBsuN6SVxq46NIUnNdXLMMbfI', 'FufEbWLknVnyAzngXSBwv3y2OBusE05M0ZFlhdMb');
Parse.serverURL = 'https://parseapi.back4app.com';
parseCache(Parse, 'MyAppName');
var query = new Parse.Query('TestClass');
query.cache(60).find().then(function (results) {
console.log(1);
results.map(function (r) {
console.log(r.fromCache);
});
console.log(results);
query.cache(60).find().then(function (cachedResults) {
console.log(2);
cachedResults.map(function (r) {
console.log(r.fromCache);
});
console.log(cachedResults);
})
})
</script>
</body>
</html>