Renamed and reorganized some objets & methods

This commit is contained in:
Simon Cambier
2024-05-26 17:39:31 +02:00
parent 0e9f7d9c20
commit 85b7810d07
7 changed files with 165 additions and 182 deletions

View File

@@ -25,7 +25,7 @@ export class SearchEngine {
* Return true if the cache is valid
*/
async loadCache(): Promise<boolean> {
const cache = await this.plugin.cacheManager.getMinisearchCache()
const cache = await this.plugin.database.getMinisearchCache()
if (cache) {
this.minisearch = await MiniSearch.loadJSAsync(
cache.data,
@@ -414,7 +414,7 @@ export class SearchEngine {
}
public async writeToCache(): Promise<void> {
await this.plugin.cacheManager.writeMinisearchCache(
await this.plugin.database.writeMinisearchCache(
this.minisearch,
this.indexedDocuments
)