MCPcopy Index your code
hub / github.com/ZenNotes/zennotes / noteReadCacheKey

Function noteReadCacheKey

packages/app-core/src/store.ts:2853–2864  ·  view source on GitHub ↗
(
  state: Pick<Store, 'vault' | 'workspaceMode' | 'remoteWorkspaceInfo'>,
  relPath: string
)

Source from the content-addressed store, hash-verified

2851const prefetchedNotePaths: string[] = []
2852
2853function noteReadCacheKey(
2854 state: Pick<Store, 'vault' | 'workspaceMode' | 'remoteWorkspaceInfo'>,
2855 relPath: string
2856): string {
2857 return [
2858 state.workspaceMode,
2859 state.vault?.root ?? '',
2860 state.remoteWorkspaceInfo?.baseUrl ?? '',
2861 state.remoteWorkspaceInfo?.profileId ?? '',
2862 relPath
2863 ].join('\0')
2864}
2865
2866function clearNoteContentReadCaches(): void {
2867 noteReadPromises.clear()

Callers 3

readNoteContentFunction · 0.85
selectNoteImplFunction · 0.85
store.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected