A cache reuses a prior computation. Its key must include every property that changes the permitted answer: identity or tenant, permission revision, source version, model or prompt version where relevant, and task input. A cache keyed only by question text can return Alice's private answer to Bob.
For a simple example, use the tuple ("alice","acl1","i1","balance") as a Python dictionary key. A tuple is an immutable ordered group. Bob's otherwise identical request has a different key and must miss. Permission revocation should change the permission revision or invalidate affected entries. Reauthorization is still required; possession of a cache key does not grant access.
Monitor accepted, rejected, completed, canceled, and failed jobs, plus queue age and per-stage latency. Isolate background indexing from interactive work with separate bounded capacity so one failing dependency cannot exhaust every lane. Cached errors also need deliberate policy: indefinitely reusing an unavailable result can conceal recovery. Record cache hit status and evidence age in traces while avoiding private payloads in ordinary logs.