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

# Clear Runtime Cache • AI Agent SDK

> clear_runtime_cache: Clear runtime cache for a specific session or all sessions.

# clear\_runtime\_cache

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**resolve**](../modules/resolve) module.

Clear runtime cache for a specific session or all sessions.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def clear_runtime_cache(session_id: Optional[str]) -> None
```

## Parameters

<ParamField query="session_id" type="Optional[str]" required={false}>
  If provided, only clear cache for this session. If None, clear all cached runtimes.
</ParamField>

## Uses

* `logger.info`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/runtime/resolve.py#L318">
  `praisonaiagents/runtime/resolve.py` at line 318
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Caching Concept" icon="database" href="/docs/docs/concepts/caching" />
</CardGroup>
