MCPcopy Create free account
hub / github.com/agegr/pi-web / invalidateSessionPathCache

Function invalidateSessionPathCache

lib/session-reader.ts:146–154  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

144}
145
146export function invalidateSessionPathCache(sessionId: string): void {
147 const pathCache = getPathCache();
148 const reverseCache = getPathToIdCache();
149 const filePath = pathCache.get(sessionId);
150 pathCache.delete(sessionId);
151 if (filePath && reverseCache.get(filePath) === sessionId) {
152 reverseCache.delete(filePath);
153 }
154}
155
156export function readSessionHeader(filePath: string): SessionHeader | null {
157 const fd = openSync(filePath, "r");

Callers 2

DELETEFunction · 0.90

Calls 2

getPathCacheFunction · 0.85
getPathToIdCacheFunction · 0.85

Tested by

no test coverage detected