mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
perf(plugin-search): improve search cache (#451)
This commit is contained in:
parent
149d31818f
commit
4ed2ed49a8
@ -92,7 +92,8 @@ export async function onSearchIndexRemoved(
|
||||
const locale = page.pathLocale
|
||||
const index = getIndexByLocale(locale, searchOptions)
|
||||
const cache = getIndexCache(fileId)
|
||||
index.removeAll(cache)
|
||||
if (cache && cache.length)
|
||||
index.removeAll(cache)
|
||||
await writeTemp(app)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user