MCPcopy Index your code
hub / github.com/simstudioai/sim / invalidateEffectiveDecryptedEnvCache

Function invalidateEffectiveDecryptedEnvCache

apps/sim/lib/environment/utils.ts:39–55  ·  view source on GitHub ↗
(input: {
  userId?: string
  workspaceId?: string
})

Source from the content-addressed store, hash-verified

37}
38
39export function invalidateEffectiveDecryptedEnvCache(input: {
40 userId?: string
41 workspaceId?: string
42}): void {
43 const { userId, workspaceId } = input
44 if (!userId && !workspaceId) return
45
46 effectiveDecryptedEnvCache.forEach((entry, cacheKey) => {
47 if (userId && entry.userId === userId) {
48 effectiveDecryptedEnvCache.delete(cacheKey)
49 return
50 }
51 if (workspaceId && entry.workspaceId === workspaceId) {
52 effectiveDecryptedEnvCache.delete(cacheKey)
53 }
54 })
55}
56
57/**
58 * Get environment variable keys for a user

Callers 3

route.tsFile · 0.90
upsertPersonalEnvVarsFunction · 0.85
upsertWorkspaceEnvVarsFunction · 0.85

Calls 1

deleteMethod · 0.65

Tested by

no test coverage detected