# is_update_cache_fresh

> **Function** in `deepagents_code`

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

Return whether a recorded check stamp is still within `CACHE_TTL`.

Lets status surfaces tell "the cache expired" apart from "the cache is
current but holds no usable answer for this install" — states that
`get_cached_update_available` collapses into the same `(False, None)`
result. Takes the stamp instead of reading it so a caller that already
called `get_last_update_check_time` does not read `CACHE_FILE` twice and
risk straddling a concurrent refresh.

## Signature

```python
is_update_cache_fresh(
    checked_at: float | None,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `checked_at` | `float \| None` | Yes | Epoch time of the last recorded check, as returned by `get_last_update_check_time`. |

## Returns

`bool`

`True` when `checked_at` is set and younger than `CACHE_TTL`.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/update_check.py#L485)