Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Evheniy Bystrov committed Feb 28, 2017
1 parent 4e26e6d commit 4bff0c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Offline first logic for yor application
async setDataToCache(data) {},
async getCacheDate() {},
async updateCacheDate() {},
timeoutErrorHandler(error) {},
ttl: 86400, // 24 hours
});

const data = await cache.getData();
Expand Down Expand Up @@ -63,12 +65,17 @@ Offline first logic for yor application
async updateCacheDate() {
await redis.set(`date_${key}`, new Date().valueOf());
},
timeoutErrorHandler(error) {
debug(error);
},
ttl: 86400,
});

const data = await cache.getData();


## Links

* [ioredis](https://github.com/luin/ioredis) - promise based redis client
* [config](https://github.com/lorenwest/node-config) - node.js config
* [ioredis](https://github.com/luin/ioredis) - promise based node.js redis client
* [config](https://github.com/lorenwest/node-config) - node.js config
* [debug](https://github.com/visionmedia/debug) - node.js debugging utility
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "offline-first-storage",
"version": "0.0.4",
"version": "0.0.5",
"description": "Offline first storage",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 4bff0c8

Please sign in to comment.