Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

refactor(identity): clarify comment on delayed re-delete for trusted IPs cache

Victor Hugo dos Santos75e471fca761
diff --git a/backend/src/services/identity-access-token/identity-access-token-service.ts b/backend/src/services/identity-access-token/identity-access-token-service.ts
index 0e0807798f..4aba7c5eac 100644
--- a/backend/src/services/identity-access-token/identity-access-token-service.ts
+++ b/backend/src/services/identity-access-token/identity-access-token-service.ts
@@ -113,7 +113,7 @@ export const identityAccessTokenServiceFactory = ({
};
// Delayed re-delete: a request that missed cache before this delete can still
- // write a stale allowlist back. Second delete ~1s later clears that race.
+ // write a stale allowlist back. Second delete ~1s later helps with race conditions, but still best effort.
const TRUSTED_IPS_CACHE_REDELETE_DELAY_MS = 1000;
const invalidateTrustedIpsCache = async (identityId: string, authMethod: IdentityAuthMethod | string) => {