langchain[minor], community[minor], core[minor]: Async Cache support and AsyncRedisCache (#15817)

* This PR adds async methods to the LLM cache. 
* Adds an implementation using Redis called AsyncRedisCache.
* Adds a docker compose file at the /docker to help spin up docker
* Updates redis tests to use a context manager so flushing always happens by default
This commit is contained in:
Dmitry Kankalovich
2024-02-08 04:06:09 +01:00
committed by GitHub
parent 19546081c6
commit f92738a6f6
8 changed files with 472 additions and 133 deletions

17
docker/docker-compose.yml Normal file
View File

@@ -0,0 +1,17 @@
# docker-compose to make it easier to spin up integration tests.
# Services should use NON standard ports to avoid collision with
version: "3"
name: langchain-tests
services:
redis:
image: redis/redis-stack-server:latest
# We use non standard ports since
# these instances are used for testing
# and users may already have existing
# redis instances set up locally
# for other projects
ports:
- "6020:6379"
volumes:
- ./redis-volume:/data