Revoked access must affect cached evidence and answers, not just fresh search results. Track which resources a cache entry depends on and re-evaluate whether the current user may receive it.
Caches preserve content and permission assumptions
A retrieval or answer cache stores material produced under a particular identity, source version, and access context. Reusing it across users or after revocation can bypass the original permission check.
For a proposed cache record, include source dependencies, scope, relevant permission version or supported freshness token, content version, and expiry policy. Use the architecture’s trusted invalidation or revalidation mechanism before delivering protected content.
Do not assume a short time-to-live provides immediate revocation. It may only bound exposure under documented conditions. State the actual guarantee and behaviour when the permission service is unavailable.
Reproduce a fictional cached salary answer
An authorised reviewer asks a question that uses restricted compensation notes. Later, their role is removed. The same question should not return the old protected answer solely because it is cached.
A second fixture uses a different employee with identical wording. A cache key based only on query text could disclose the reviewer’s result. The design needs the appropriate scope and source checks rather than treating answer text as universally reusable.
| Cache condition | Required behaviour |
|---|---|
| Same user, access unchanged | Reuse only under valid freshness policy |
| Source access revoked | Protected entry invalidated or denied |
| Different user, narrower scope | No cross-user disclosure |
| Source content deleted | Dependency removal applied |
| Permission state unknown | Defined safe fallback |
Test retrieval caches, generated answers, source previews, and in-progress context separately. Clearing one layer may leave another path serving the same content.
Be honest about already delivered material
The application generally cannot retract information a person already read or copied. The control governs future delivery and ongoing processing under the supported policy. Minimise unnecessary prior distribution and protect external artifacts separately.
Strong dependency tracking adds metadata and lookup cost. Coarse cache expiry is simpler but may not meet the required revocation boundary. Choose the approach from actual consequence and identity-system capabilities, then verify latency and failure behaviour.
This cache design is proposed. The voice integration case study describes related retrieval work without claiming revocation guarantees. Pair it with employee access-change handling.
Cached access FAQ
Is query-text caching safe for all users?
Not for protected content without the appropriate identity, source, and permission context.
Does cache expiry equal immediate revocation?
No. Describe and test the actual invalidation or revalidation guarantee.
What should happen to an ongoing answer?
Apply the explicitly defined revocation policy rather than assuming the next fresh search will remove already assembled context.