# SQLAlchemyCache

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/cache/SQLAlchemyCache)

Cache that uses SQAlchemy as a backend.

## Signature

```python
SQLAlchemyCache(
    self,
    engine: Engine,
    cache_schema: Type[FullLLMCache] = FullLLMCache,
)
```

## Extends

- `BaseCache`

## Constructors

```python
__init__(
    self,
    engine: Engine,
    cache_schema: Type[FullLLMCache] = FullLLMCache,
)
```

| Name | Type |
|------|------|
| `engine` | `Engine` |
| `cache_schema` | `Type[FullLLMCache]` |


## Properties

- `engine`
- `cache_schema`

## Methods

- [`lookup()`](https://reference.langchain.com/python/langchain-community/cache/SQLAlchemyCache/lookup)
- [`update()`](https://reference.langchain.com/python/langchain-community/cache/SQLAlchemyCache/update)
- [`clear()`](https://reference.langchain.com/python/langchain-community/cache/SQLAlchemyCache/clear)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/cache.py#L244)