# SyncCacheTestSuite

> **Class** in `langchain_tests`

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

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

This test suite 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
SyncCacheTestSuite()
```

## Extends

- `BaseStandardTests`

## Methods

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

---

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