MCPcopy Create free account
hub / github.com/freecodexyz/free-code / cleanupSessionPluginCache

Function cleanupSessionPluginCache

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

Source from the content-addressed store, hash-verified

144 * Should be called when the session ends.
145 */
146export async function cleanupSessionPluginCache(): Promise<void> {
147 if (!sessionPluginCachePath) {
148 return
149 }
150 try {
151 await rm(sessionPluginCachePath, { recursive: true, force: true })
152 logForDebugging(
153 `Cleaned up session plugin cache at ${sessionPluginCachePath}`,
154 )
155 } catch (error) {
156 logForDebugging(`Failed to clean up session plugin cache: ${error}`)
157 } finally {
158 sessionPluginCachePath = null
159 sessionPluginCachePromise = null
160 }
161}
162
163/**
164 * Reset the session plugin cache path (for testing).

Callers

nothing calls this directly

Calls 2

rmFunction · 0.85
logForDebuggingFunction · 0.85

Tested by

no test coverage detected