> ## Documentation Index
> Fetch the complete documentation index at: https://ikun.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 工具结果缓存

工具结果缓存旨在通过将函数调用的结果存储在磁盘上来避免不必要的重新计算。这在开发和测试过程中非常有用，可以加快开发速度、避免速率限制并降低成本。

所有 Agno Toolkits 都支持此功能。

## 示例

将 `cache_results=True` 传递给 Toolkit 构造函数，以启用该 Toolkit 的缓存。

```python cache_tool_calls.py theme={null}
import asyncio

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.tools.yfinance import YFinanceTools

agent = Agent(
    model=OpenAIChat(id="gpt-4o-mini"),
    tools=[DuckDuckGoTools(cache_results=True), YFinanceTools(cache_results=True)],
    show_tool_calls=True,
)

asyncio.run(
    agent.aprint_response(
        "What is the current stock price of AAPL and latest news on 'Apple'?",
        markdown=True,
    )
)
```
