# InMemoryCache

> **Class** in `langchain_community`

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

Cache that stores things in memory.

## Signature

```python
InMemoryCache(
    self,
)
```

## Extends

- `BaseCache`

## Constructors

```python
__init__(
    self,
) -> None
```


## Methods

- [`lookup()`](https://reference.langchain.com/python/langchain-community/cache/InMemoryCache/lookup)
- [`update()`](https://reference.langchain.com/python/langchain-community/cache/InMemoryCache/update)
- [`clear()`](https://reference.langchain.com/python/langchain-community/cache/InMemoryCache/clear)
- [`alookup()`](https://reference.langchain.com/python/langchain-community/cache/InMemoryCache/alookup)
- [`aupdate()`](https://reference.langchain.com/python/langchain-community/cache/InMemoryCache/aupdate)
- [`aclear()`](https://reference.langchain.com/python/langchain-community/cache/InMemoryCache/aclear)

---

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