add a more resilient cache system with a global cache for each note from path

This commit is contained in:
Julien Calixte
2024-07-16 21:55:54 +02:00
parent 100d593050
commit 8802ffb5b2
3 changed files with 27 additions and 4 deletions

View File

@@ -18,7 +18,10 @@ export const useFile = (sha: Ref<string> | string, retrieveContent = true) => {
renderFromUTF8,
getRawContent: getRawContentFromFile
} = useMarkdown(toValue(sha))
const { getCachedNote, saveCacheNote } = prepareNoteCache(toValue(sha))
const { getCachedNote, saveCacheNote } = prepareNoteCache(
toValue(sha),
toValue(path)
)
const fromCache = ref(false)
const rawContent = ref('')