(slackUserId?: string)
| 184 | * Invalidate admin status cache for a Slack user (call when admin membership changes) |
| 185 | */ |
| 186 | export function invalidateAdminStatusCache(slackUserId?: string): void { |
| 187 | if (slackUserId) { |
| 188 | adminStatusCache.delete(slackUserId); |
| 189 | } else { |
| 190 | adminStatusCache.clear(); |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | // Cache for web user admin status (keyed by WorkOS user ID) |
| 195 | const webAdminStatusCache = new Map<string, { isAdmin: boolean; expiresAt: number }>(); |
no test coverage detected