This commit is contained in:
Simon Cambier
2023-07-28 11:12:49 +02:00
parent eecae4739b
commit fe76932b12
3 changed files with 54 additions and 46 deletions

View File

@@ -1,6 +1,7 @@
import Dexie from 'dexie'
import type { AsPlainObject } from 'minisearch'
import type { DocumentRef } from './globals'
import { Notice } from 'obsidian'
export class OmnisearchCache extends Dexie {
public static readonly dbVersion = 8
@@ -57,6 +58,7 @@ export class OmnisearchCache extends Dexie {
}
public async clearCache() {
new Notice('Omnisearch - Cache cleared. Please restart Obsidian.')
await this.minisearch.clear()
}
}