-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERR by redis : RedisCache.upsert() got an unexpected keyword argument 'lock' #1909
Comments
The issue you're experiencing with the To resolve this error, you should remove the For reference, the
|
I used to LANGFLOW_CACHE_TYPE= redis on 0.6.17. |
To configure and use from langflow.services.cache.service import RedisCache
# Initialize the RedisCache
cache = RedisCache(host="localhost", port=6379, db=0, expiration_time=3600)
# Check if the Redis client is connected
if cache.is_connected():
print("Connected to Redis")
# Setting cache values
cache.set("a", 1)
cache.set("b", 2)
cache["c"] = 3
# Getting cache values
a = cache.get("a")
b = cache["b"]
print(f"a: {a}, b: {b}")
# Upserting cache values
cache.upsert("a", {"new_key": "new_value"})
print(f"Updated a: {cache.get('a')}")
# Deleting a cache value
cache.delete("a")
print(f"a after deletion: {cache.get('a')}")
# Clearing the cache
cache.clear()
print(f"Cache after clearing: {list(cache._client.keys())}") This example demonstrates how to initialize the Additionally, Redis operations are atomic, ensuring data consistency in a multi-process environment. However, be aware that |
Hello, |
Hi @songjinu, I hope you're doing well. Just a friendly reminder that if we do not hear back from you within the next 3 days, we will close this issue. If you need more time or further assistance, please let us know. Thank you for your understanding! |
Thank you for your contribution! This issue will be closed. If you have any questions or encounter another problem, please open a new issue and we will be ready to assist you. |
Describe the bug
I got a error when use redis cache.
The text was updated successfully, but these errors were encountered: