Skip to main content

RedisStore

The RedisStore is an implementation of ByteStore that stores everything in your Redis instance.

To configure Redis, follow our Redis guide.

!pip install redis
from langchain.storage import RedisStore

store = RedisStore(redis_url="redis://localhost:6379")

store.mset([("k1", b"v1"), ("k2", b"v2")])
print(store.mget(["k1", "k2"]))
[b'v1', b'v2']