Wednesday, May 6, 2026

Invalidate the recipient-suggestions cache when roster or coordinator-role writes happen, so the panel reflects changes immediately instead of waiting up to 30s

Volleyball Elite Academy development update
Volleyball Elite Academy
Invalidate the recipient-suggestions cache when roster or coordinator-role writes happen, so the panel reflects changes immediately instead of waiting up to 30s

Invalidate the recipient-suggestions cache when roster or coordinator-role writes happen, so the panel reflects changes immediately instead of waiting up to 30s

Volleyball Elite Academy — Development Update • May 6, 2026

--- title: Invalidate the recipient-suggestions cache when roster or coordinator-role writes happen, so the panel reflects changes immediately instead of waiting up to 30s ---

Invalidate the recipient-suggestions cache when roster or coordinator-role writes happen, so the panel reflects changes immediately instead of waiting up to 30s

## What & Why The current in keeps eligibility set lookups in memory for 30 seconds. That's fine for the bulk of cases — a roster swap or coordinator role grant will eventually surface in the admin "Saved Email Recipients" panel. But during a coordinator's active session, if they (a) approve a new role assignment, (b) add or remove an athlete from a roster, or (c) link/unlink a guardian, the panel can show a stale "stale recipients" count for up to 30s. That's confusing because a coordinator who just acted on the underlying data expects the staleCount badge to reflect their write immediately.

A targeted invalidation — after the relevant writes (or if the write is roster-wide) — would tighten the staleness window to "instant on writes, 30s otherwise". The hard part is identifying which writes feed the eligibility set; the underlying walks roster + parent-of + coordinator-role joins, so any write to , , or for an APPROVED row should invalidate.

## Done looks like - The cache is invalidated synchronously on writes that change the eligibility set (roster add/remove, parent/child link, coordinator role grant/revoke). - A test pins the invalidation: after a write, the next eligibility lookup against the affected sessionId hits storage instead of returning a cached value. - TTL still acts as a safety net for any write paths the invalidation list misses.

## Relevant files - (, ) - ( and the writes that modify the joined tables it reads)

Volleyball Elite Academy

Reply to this email — we read every reply.

You received this because you have an account with Volleyball Elite Academy.

elitevolleyball.training

No comments:

Post a Comment