(input: {
userId?: string
workspaceId?: string
})
| 37 | } |
| 38 | |
| 39 | export 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 |
no test coverage detected