# AsyncCacheTestSuite

> **Class** in `langchain_tests`

📖 [View in docs](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite)

Test suite for checking the `BaseCache` API of a caching layer for LLMs.

Verifies the basic caching API of a caching layer for LLMs.

The test suite is designed for synchronous caching layers.

Implementers should subclass this test suite and provide a fixture that returns an
empty cache for each test.

## Signature

```python
AsyncCacheTestSuite()
```

## Extends

- `BaseStandardTests`

## Methods

- [`cache()`](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite/cache)
- [`get_sample_prompt()`](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite/get_sample_prompt)
- [`get_sample_llm_string()`](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite/get_sample_llm_string)
- [`get_sample_generation()`](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite/get_sample_generation)
- [`test_cache_is_empty()`](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite/test_cache_is_empty)
- [`test_update_cache()`](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite/test_update_cache)
- [`test_cache_still_empty()`](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite/test_cache_still_empty)
- [`test_clear_cache()`](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite/test_clear_cache)
- [`test_cache_miss()`](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite/test_cache_miss)
- [`test_cache_hit()`](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite/test_cache_hit)
- [`test_update_cache_with_multiple_generations()`](https://reference.langchain.com/python/langchain-tests/integration_tests/cache/AsyncCacheTestSuite/test_update_cache_with_multiple_generations)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/9f232caa7a8fe1ca042a401942d5d90d54ceb1a6/libs/standard-tests/langchain_tests/integration_tests/cache.py#L109)