# PromptCachePolicy

> **Class** in `deepagents_code`

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

Prompt-cache behavior needed to decide and price a warning.

Keyword-only because `window_seconds` and `minimum_tokens` are adjacent
bare ints: positionally, transposing them builds a plausible-looking policy
that silently misprices and mis-gates.

## Signature

```python
PromptCachePolicy(
    self,
    *,
    provider_name: str,
    window_seconds: int,
    confidence: CacheConfidence,
    minimum_tokens: int,
    write_bucket: CacheWriteBucket,
)
```

## Constructors

```python
__init__(
    self,
    *,
    provider_name: str,
    window_seconds: int,
    confidence: CacheConfidence,
    minimum_tokens: int,
    write_bucket: CacheWriteBucket,
) -> None
```

| Name | Type |
|------|------|
| `provider_name` | `str` |
| `window_seconds` | `int` |
| `confidence` | `CacheConfidence` |
| `minimum_tokens` | `int` |
| `write_bucket` | `CacheWriteBucket` |


## Properties

- `provider_name`
- `window_seconds`
- `confidence`
- `minimum_tokens`
- `write_bucket`

---

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