Added default cache time to be 1 day

This commit is contained in:
2017-10-22 18:16:39 +02:00
parent 1925c2a5e3
commit 0e3189ff11

View File

@@ -33,7 +33,7 @@ class Cache {
* @param {Number} timeToLive the number of seconds before entry expires
* @returns {Object}
*/
set(key, value, timeToLive = 60) {
set(key, value, timeToLive = 86400) {
const json = JSON.stringify(value);
return Promise.resolve()
.then(() => this.database.run(this.queries.create, [key, json, timeToLive]))