diff --git a/docs/servers/middleware.mdx b/docs/servers/middleware.mdx index cea5d3c27..1c66fea33 100644 --- a/docs/servers/middleware.mdx +++ b/docs/servers/middleware.mdx @@ -431,6 +431,10 @@ mcp.add_middleware(ResponseCachingMiddleware( See [Storage Backends](/servers/storage-backends) for complete options. + +Cache keys are based on the operation name and arguments only — they do not include user or session identity. If your tools return user-specific data derived from auth context (e.g., headers or session state) rather than from the request arguments, you should either disable caching for those tools or ensure user identity is part of the tool arguments. + + ### Rate Limiting ```python