Why it matters

Invalidation shapes freshness. Understanding shapes cache safety.

Advertisement

The architecture

Version keys change on update.

Explicit purge on doc change.

Namespace by tenant + model.

Invalidation flowUpdate triggermodel / prompt / docVersion bump or purgeinvalidate entriesFresh callspopulate againVersion bump easiest; explicit purge for granular; TTL as backstop
Cache invalidation.
Advertisement

How it works end to end

Version key: increment on update.

Tag-based purge (Caffeine, Redis).

TTL as backstop.