Opt-in to caching with familiar _cache-control_ and _stale-while-revalidate_ options. MCP tool calls include caching information in their _\_meta_ fields, providing parity with standard HTTP headers.
Agentic uses Cloudflare's global edge cache for caching, which guarantees unmatched global performance.
## Enabling Caching
You can enable caching for individual tools by setting [pure](/publishing/config/tool-config#param-pure) or [cacheControl](/publishing/config/tool-config#param-cache-control) on the tool's config.
## Cache Keys
Cache keys for tool calls are generated by normalizing the tool call's input, regardless of whether the tool call was made via `HTTP POST`, `HTTP GET`, or `MCP`.
Tool call args will be hashed using a deterministic, stable JSON serialization algorithm, so tool calls with semantically identical input will have identical cache keys.
## Disabling Caching
Individual tool calls can disable caching by setting the standard `Cache-Control` header to `no-store` or `no-cache`.
<Note>
Note that by default, caching is disabled for all tools. You must explicitly
enable caching for each tool in your Agentic project config.
</Note>
## Examples
<Tabs>
<Tab title="Pure Tool">
```ts agentic.config.ts
import { defineConfig } from '@agentic/platform'
// In this example, `my-tool` is marked as pure which means its responses
// will be cached aggressively for identical requests using `cache-control`