MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / getSessionPluginCachePath

Function getSessionPluginCachePath

src/utils/plugins/zipCache.ts:125–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123 * This is a temp directory on local disk where plugins are extracted for the session.
124 */
125export async function getSessionPluginCachePath(): Promise<string> {
126 if (sessionPluginCachePath) {
127 return sessionPluginCachePath
128 }
129 if (!sessionPluginCachePromise) {
130 sessionPluginCachePromise = (async () => {
131 const suffix = randomBytes(8).toString('hex')
132 const dir = join(tmpdir(), `claude-plugin-session-${suffix}`)
133 await getFsImplementation().mkdir(dir)
134 sessionPluginCachePath = dir
135 logForDebugging(`Created session plugin cache at ${dir}`)
136 return dir
137 })()
138 }
139 return sessionPluginCachePromise
140}
141
142/**
143 * Clean up the session plugin cache directory.

Calls 3

getFsImplementationFunction · 0.85
logForDebuggingFunction · 0.85
toStringMethod · 0.65

Tested by

no test coverage detected