Quick Decision Rule: When Adding semantic caching to reduce LLM latency for a multi-tenant SaaS assistant answering questions about private company docs, choose Scope every cache key strictly by `tenant_id` and user RBAC permissions before similarity lookup.
| Trigger Condition | Adding semantic caching to reduce LLM latency for a multi-tenant SaaS assistant answering questions about private company docs |
|---|---|
| Recommended Choice | Scope every cache key strictly by `tenant_id` and user RBAC permissions before similarity lookup |
| Classic Trap | A global semantic cache will match User B’s similar query to User A’s cached answer, leaking confidential cross-tenant PII. |
| Verification | Audited on 2026-11-23 · Anthropic & OWASP Standard · 2026 |
30-SECOND DECISION TRAP CHECK · SECURITY
To cut OpenAI bills by 40%, an engineer enables a global semantic cache across a multi-tenant HR copilot. Soon Employee B asks "What is my Q4 bonus policy?" and receives Employee A’s confidential executive comp breakdown. What caused the breach?
Semantic caching without strict tenant and authorization scoping turns similar phrasing into a catastrophic cross-tenant PII leak.
Trap: Every RAG index and semantic cache in multi-tenant systems must enforce tenant + RBAC isolation before lookup.