# ColdCacheWarning

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/cold_cache/ColdCacheWarning)

Validated data needed to render one advisory warning.

Constructed only after every gate has passed -- a policy resolved, the
prefix cleared the provider's cache minimum, and the priced delta reached
the configured threshold -- so the modal renders it without re-deciding
anything.

## Signature

```python
ColdCacheWarning(
    self,
    policy: PromptCachePolicy,
    estimate: RewarmEstimate,
    context_tokens: int,
    age_seconds: float | None,
    reason: ColdCacheReason,
)
```

## Constructors

```python
__init__(
    self,
    policy: PromptCachePolicy,
    estimate: RewarmEstimate,
    context_tokens: int,
    age_seconds: float | None,
    reason: ColdCacheReason,
) -> None
```

| Name | Type |
|------|------|
| `policy` | `PromptCachePolicy` |
| `estimate` | `RewarmEstimate` |
| `context_tokens` | `int` |
| `age_seconds` | `float \| None` |
| `reason` | `ColdCacheReason` |


## Properties

- `policy`
- `estimate`
- `context_tokens`
- `age_seconds`
- `reason`

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/4bfa52000ef65ac623d8ada0cb67f67cbdd663ea/libs/code/deepagents_code/cold_cache.py#L303)