Skip to content
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

Provision to skip caching immediately if not able to make connection with Redis #177

Closed
shijo-keyvalue opened this issue Dec 20, 2023 · 4 comments

Comments

@shijo-keyvalue
Copy link

Hi , when its unable to connect to redis using the connections parameters provided , API is taking around 20 seconds before it skips caching.
Is there any way in which we can reduce the time taken before caching is getting skipped ?
I have a requirement to immediately skip the cache if redis connection cannot be established.

I have tried this. But it didn't worked.

cache.setup(redis_connection_url,retry_on_timeout=False, socket_connect_timeout=0.1)

Any insights or recommendations on how to address this would be greatly appreciated.

Thank you in advance for your assistance.

@alessio-locatelli
Copy link

Thank you for opening an issue, but I would move this to "Discussions".

You need to include more details.

API is taking around 20 seconds before it skips caching

How do you know this? Can you show a small code sample and logs or an error traceback?

Please try to use suppress=False and show the error you get when "not able to make connection with Redis".

@Krukov
Copy link
Owner

Krukov commented Jan 2, 2024

Probably it is related to the bug with redis-p==5.0.1

What version of redis-py do you use?

@shijo-keyvalue
Copy link
Author

shijo-keyvalue commented Jan 3, 2024

@Krukov
Yes , the version I was using was 5.0.1 . Now I changed it to 5.0.0.
Now its not taking 20 seconds to skip caching. Its getting completed in 1 second or so.
Thanks for the inputs 👍
Please feel free to close if there is already another issue to track the same.

@Krukov
Copy link
Owner

Krukov commented Jan 3, 2024

Awesome. The issue is already solved

@Krukov Krukov closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants