π The fast, Pythonic way to build MCP servers and clients.
Add cache key identity note to middleware docs
Jeremiah Lowin62804e2f067d
diff --git a/docs/servers/middleware.mdx b/docs/servers/middleware.mdxindex 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.+<Note>+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.+</Note>+### Rate Limiting```python