docs: recommendations for cache memory (#8140)

* env-vars-table

* remove-cache-table

* fix-bool-cli-links

* run-cache

* note

* code-review

* support
This commit is contained in:
Mendon Kissling 2025-05-28 11:29:01 -04:00 committed by GitHub
commit f45ca81dda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 27 deletions

View file

@ -84,17 +84,11 @@ LANGFLOW_DB_CONNECT_TIMEOUT=20
## Configure cache memory
Langflow provides multiple caching options that can be configured using the `LANGFLOW_CACHE_TYPE` environment variable.
The default Langflow caching behavior is an asynchronous, in-memory cache.
```
LANGFLOW_LANGCHAIN_CACHE=InMemoryCache
LANGFLOW_CACHE_TYPE=Async
```
| Type | Description | Storage Location | Persistence |
| ----------------- | ---------------------------- | ------------------------ | ---------------------- |
| `async` (default) | Asynchronous in-memory cache | Application memory | Cleared on restart |
| `memory` | Thread-safe in-memory cache | Application memory | Cleared on restart |
| `disk` | File system-based cache | System cache directory\* | Persists after restart |
| `redis` | Distributed cache | Redis server | Persists in Redis |
\*System cache directory locations:
- Linux/WSL: `~/.cache/langflow/`
- macOS: `/Users/<username>/Library/Caches/langflow/`
- Windows: `%LOCALAPPDATA%\langflow\langflow\Cache`
Alternative caching options can be configured, but options other than the default asynchronous, in-memory cache are not supported.
The default behavior is suitable for most use cases.