Moved, renamed, re-did and added a lot of stuff. Getting ready for the v2 upgrade

This commit is contained in:
2019-11-03 20:33:30 +01:00
parent 879a02b388
commit b802a7b62b
33 changed files with 576 additions and 727 deletions

View File

@@ -18,12 +18,12 @@ class Cache {
* @returns {Object}
*/
get(key) {
return Promise.resolve()
.then(() => this.database.get(this.queries.read, [key]))
.then((row) => {
assert(row, 'Could not find cache enrty with that key.');
return JSON.parse(row.value);
});
return Promise.resolve()
.then(() => this.database.get(this.queries.read, [key]))
.then(row => {
assert(row, 'Could not find cache entry with that key.');
return JSON.parse(row.value);
})
}
/**