# Caching to PostgreSQL

**URL:** <https://forum.langchain.com/t/caching-to-postgresql/809>\
**Category:** LangChain\
**Tags:** self-hosted, intro-to-langgraph, python-help\
**Created:** [July 29, 2025, 2:19pm UTC](https://forum.langchain.com/t/caching-to-postgresql/809 "2025-07-29T14:19:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ceyxasm](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/ceyxasm/32/386_2.png) [@ceyxasm](https://forum.langchain.com/u/ceyxasm)\
**Post date:** [July 29, 2025, 2:19pm UTC](https://forum.langchain.com/t/caching-to-postgresql/809/1 "2025-07-29T14:19:18Z")

</div>

### Feature request

Hey team, according to documentation here; only `inMemory` and `SQLite` cache is being supported as of now.  
I was wondering if caching to a postgres server will be possible.

### Motivation

1. I already have a database that uses postgres. Having support for the same might help me and I wont have to actively maintain 2 DBs
2. It will expand the horizons of usage, offering wider supports.. so why not.

---

<div class="post-metadata">

**Author:** ![niilooy](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/niilooy/32/2886_2.png) [@niilooy](https://forum.langchain.com/u/niilooy)\
**Post date:** [July 30, 2025, 8:19pm UTC](https://forum.langchain.com/t/caching-to-postgresql/809/2 "2025-07-30T20:19:46Z")

</div>

Hi @ceyxasm! Welcome to the community! I think this might help you out!

> **[Model caches | 🦜️🔗 LangChain](https://python.langchain.com/docs/integrations/llm_caching/#sqlalchemy-cache)**
>
> This notebook covers how to cache results of individual LLM calls using different caches.
