# AsyncCache

> **Class** in `langsmith`

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

Deprecated alias for AsyncPromptCache. Use AsyncPromptCache instead.

## Signature

```python
AsyncCache(
    self,
    *,
    max_size: int = DEFAULT_PROMPT_CACHE_MAX_SIZE,
    ttl_seconds: Optional[float] = DEFAULT_PROMPT_CACHE_TTL_SECONDS,
    refresh_interval_seconds: float = DEFAULT_PROMPT_CACHE_REFRESH_INTERVAL_SECONDS,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `max_size` | `int` | No | Maximum entries in cache (LRU eviction when exceeded). (default: `DEFAULT_PROMPT_CACHE_MAX_SIZE`) |
| `ttl_seconds` | `Optional[float]` | No | Time before entry is considered stale. (default: `DEFAULT_PROMPT_CACHE_TTL_SECONDS`) |
| `refresh_interval_seconds` | `float` | No | How often to check for stale entries. (default: `DEFAULT_PROMPT_CACHE_REFRESH_INTERVAL_SECONDS`) |

## Extends

- `AsyncPromptCache`

## Constructors

```python
__init__(
    self,
    *,
    max_size: int = DEFAULT_PROMPT_CACHE_MAX_SIZE,
    ttl_seconds: Optional[float] = DEFAULT_PROMPT_CACHE_TTL_SECONDS,
    refresh_interval_seconds: float = DEFAULT_PROMPT_CACHE_REFRESH_INTERVAL_SECONDS,
) -> None
```

| Name | Type |
|------|------|
| `max_size` | `int` |
| `ttl_seconds` | `Optional[float]` |
| `refresh_interval_seconds` | `float` |


---

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