Catching possible errors

This commit is contained in:
Simon Cambier
2022-10-22 19:59:10 +02:00
parent 77d583d5f8
commit ecbbcd4e99
2 changed files with 54 additions and 44 deletions

View File

@@ -54,25 +54,6 @@ class CacheManager {
return !indexedNote || indexedNote.mtime !== file.stat.mtime
}
// private async _writeMinisearchIndex(minisearch: MiniSearch): Promise<void> {
// if (!settings.persistCache) {
// return
// }
// const json = JSON.stringify(minisearch)
// const data = deflate(json)
// await app.vault.adapter.writeBinary(minisearchCacheFilePath, data as any)
// console.log('Omnisearch - Minisearch index saved on disk')
// }
//
// private async _saveNotesCache() {
// if (!settings.persistCache) {
// return
// }
// const json = JSON.stringify(Array.from(this.documentsCache.entries()))
// const data = deflate(json)
// await app.vault.adapter.writeBinary(notesCacheFilePath, data as any)
// console.log('Omnisearch - Notes cache saved on disk')
// }
}
export const cacheManager = new CacheManager()