#118 - Improved caching

That will teach me to read documentation (it won't).
This commit is contained in:
Simon Cambier
2022-10-28 13:03:43 +02:00
parent 422f84c1cf
commit 9af71e3efc
4 changed files with 21 additions and 14 deletions

View File

@@ -6,14 +6,14 @@ class OmnisearchCache extends Dexie {
string
>
searchHistory!: Dexie.Table<{ id?: number; query: string }, number>
minisearch!: Dexie.Table<{date: string; data: string}, string>
minisearch!: Dexie.Table<{ date: string; data: string }, string>
constructor() {
super(app.appId + '_omnisearch')
this.version(4).stores({
pdf: 'path, hash, size, text',
searchHistory: '++id, query',
minisearch: 'date, data'
super('omnisearch/cache/' + app.appId)
this.version(5).stores({
pdf: 'path, hash, size',
searchHistory: '++id',
minisearch: 'date',
})
}
}