# CacheMetrics

> **Class** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/prompt_cache/CacheMetrics)

Cache performance metrics.

## Signature

```python
CacheMetrics(
    self,
    hits: int = 0,
    misses: int = 0,
    refreshes: int = 0,
    refresh_errors: int = 0,
)
```

## Constructors

```python
__init__(
    self,
    hits: int = 0,
    misses: int = 0,
    refreshes: int = 0,
    refresh_errors: int = 0,
) -> None
```

| Name | Type |
|------|------|
| `hits` | `int` |
| `misses` | `int` |
| `refreshes` | `int` |
| `refresh_errors` | `int` |


## Properties

- `hits`
- `misses`
- `refreshes`
- `refresh_errors`
- `total_requests`
- `hit_rate`

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/cc54cc2729bb1cfe402fd9f34cf953de60bde30c/python/langsmith/prompt_cache.py#L48)