diff options
author | Andrew Dolgov <[email protected]> | 2017-02-27 09:40:08 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-02-27 09:40:08 +0300 |
commit | 17f826cd1d1fdaa7212a568c371273f702f77b7c (patch) | |
tree | 8f624c67d529b289abf16badedb348d263e84f3c /js/index.js | |
parent | bc720234f59d39119c9486ff88f248bacd3140c3 (diff) |
store basic settings in indexed db
Diffstat (limited to 'js/index.js')
-rw-r--r-- | js/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/index.js b/js/index.js index 336232f..b314cc0 100644 --- a/js/index.js +++ b/js/index.js @@ -1,12 +1,12 @@ function cache_refresh() { if ('serviceWorker' in navigator) { - localforage.getItem("epube-cache.timestamp").then(function(stamp) { + localforage.getItem("epube.cache-timestamp").then(function(stamp) { var ts = parseInt(new Date().getTime()/1000); if (!stamp || ts - stamp > 3600) { console.log('asking worker to refresh cache'); navigator.serviceWorker.controller.postMessage("refresh-cache"); - localforage.setItem("epube-cache.timestamp", ts); + localforage.setItem("epube.cache-timestamp", ts); } }); |