This repository has been archived by the owner on Feb 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
40 lines (35 loc) · 1.78 KB
/
test.js
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
38
39
40
var WebCache = require('./index.js');
var webCache = new WebCache(['http://tesera.com']);
webCache.seed().then(function () {
webCache.get('http://google.com').then(function (data) {
console.log(data);
});
});
// var webCache = new WebCache(['http://tesera.com', 'http://google.com']);
// webCache.seed().then(function () {
// webCache.get('http://google.com').then(function (data) {
// console.log(data);
// });
// });
// var webCache = new WebCache(['http://tesera.com'], {refreshInterval: 1200});
// var urls = [
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/Northwest-Coastal",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/Northwest-Inland",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/Sea-to-Sky",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/South-Coast",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/North-Shore",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/Cariboos",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/Monashees-Selkirks",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/South-Columbia",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/Purcells",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/Kootenay-Boundary",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/South-Rockies",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/Lizardrange",
// "http://old.avalanche.ca/dataservices/cac/bulletins/xml/Kananaskis"
// ];
// var webCache = new WebCache(urls);
// webCache.seed().then(function () {
// webCache.get('http://old.avalanche.ca/dataservices/cac/bulletins/xml/Northwest-Inland').then(function (data) {
// console.log(data);
// });
// });