(root: string, rel?: string)
| 1857 | } |
| 1858 | |
| 1859 | export function invalidateNoteMetaCache(root: string, rel?: string): void { |
| 1860 | const rootAbs = path.resolve(root) |
| 1861 | clearScheduledPersistNoteMetaCache(rootAbs) |
| 1862 | if (!rel) { |
| 1863 | for (const key of noteMetaCache.keys()) { |
| 1864 | if (key.startsWith(`${rootAbs}\0`)) noteMetaCache.delete(key) |
| 1865 | } |
| 1866 | loadedPersistedNoteMetaCacheRoots.delete(rootAbs) |
| 1867 | return |
| 1868 | } |
| 1869 | |
| 1870 | try { |
| 1871 | noteMetaCache.delete(noteMetaCacheKey(root, resolveSafe(root, rel))) |
| 1872 | } catch { |
| 1873 | /* ignore invalid relative paths */ |
| 1874 | } |
| 1875 | } |
| 1876 | |
| 1877 | async function getCachedVaultTextSearchCandidates( |
| 1878 | root: string, |
no test coverage detected