Skip to content

chore(cache): remove unused session-cache invalidation methods#382

Merged
rmyndharis merged 1 commit into
mainfrom
chore/remove-unused-cache-invalidation
Jun 20, 2026
Merged

chore(cache): remove unused session-cache invalidation methods#382
rmyndharis merged 1 commit into
mainfrom
chore/remove-unused-cache-invalidation

Conversation

@rmyndharis

Copy link
Copy Markdown
Owner

What

CacheService.invalidateAll, invalidateSession, and invalidateSessionsList have zero callers anywhere in the codebase (verified by repo-wide grep; no spec references them either). The session cache is TTL-only — entries expire on their own (15s–10min), and nothing ever invoked proactive invalidation — so these three methods were vestigial scaffolding.

Removing them also drops a blocking redis.keys('session:*') scan that lived inside the never-called invalidateAll (a latent footgun had it ever been wired up).

Notes

  • No behaviour change — the methods were dead code; the cache continues to rely on TTL expiry exactly as it does today.
  • If proactive cache-busting on session changes is ever wanted, that's a separate, additive feature (wire invalidateSession into the session lifecycle) — intentionally out of scope here.
  • Build + lint + full backend suite (987 tests) green.

invalidateAll / invalidateSession / invalidateSessionsList had zero callers
anywhere in the codebase — the session cache is TTL-only (15s–10min expiries),
so these were vestigial scaffolding. Removing them also drops a blocking Redis
KEYS scan that lived in the never-called invalidateAll.

No behaviour change (the methods were dead); no specs referenced them. Build +
lint + full suite (987 tests) green.
@rmyndharis rmyndharis merged commit 927c825 into main Jun 20, 2026
5 checks passed
@rmyndharis rmyndharis deleted the chore/remove-unused-cache-invalidation branch June 20, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants