summaryrefslogtreecommitdiff
path: root/ext/bg/js/database.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/database.js')
-rw-r--r--ext/bg/js/database.js15
1 files changed, 0 insertions, 15 deletions
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js
index c4d332bf..95466e73 100644
--- a/ext/bg/js/database.js
+++ b/ext/bg/js/database.js
@@ -20,7 +20,6 @@
class Database {
constructor() {
this.db = null;
- this.tagCache = {};
}
async prepare() {
@@ -53,7 +52,6 @@ class Database {
this.db.close();
await this.db.delete();
this.db = null;
- this.tagCache = {};
await this.prepare();
}
@@ -180,20 +178,9 @@ class Database {
return results;
}
- findTagForTitleCached(name, title) {
- if (this.tagCache.hasOwnProperty(title)) {
- const cache = this.tagCache[title];
- if (cache.hasOwnProperty(name)) {
- return cache[name];
- }
- }
- }
-
async findTagForTitle(name, title) {
this.validate();
- const cache = (this.tagCache.hasOwnProperty(title) ? this.tagCache[title] : (this.tagCache[title] = {}));
-
let result = null;
await this.db.tagMeta.where('name').equals(name).each(row => {
if (title === row.dictionary) {
@@ -201,8 +188,6 @@ class Database {
}
});
- cache[name] = result;
-
return result;
}