Skip to content

Conversation

@vzcodes
Copy link

@vzcodes vzcodes commented May 11, 2025

Speed up lookups by implementing a simple redis cache in python.

FIDE ratings only update once per month so this is the perfect use case for implementing a redis cache.

Closes #8

image

@vercel
Copy link

vercel bot commented May 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fide-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2025 5:41am

@vzcodes
Copy link
Author

vzcodes commented May 11, 2025

I'm pretty sure Vercel won't be able to deploy a redis cache without using a redis cloud offering.

Edit: I deployed this version to docker running in a linux server and as you can see there is big improvements in the performance. See the deployed version here.

image

@cassiofb-dev
Copy link
Owner

Thats really awesome!

The vercel preview is working fine.
Do you want to edit the readme and include this instance?

@vzcodes
Copy link
Author

vzcodes commented May 11, 2025

No, it's not going to work with the current deployment configuration. As in the api will work without the cache. I've set it up to run redis inside the docker container. I checked out Vercel and it's currently going to run whatever is in the Vercel Function. It's stateless.

The only way to keep Vercel and run a Redis cache is to implement a cloud based one https://redis.io/docs/latest/operate/rc/cloud-integrations/vercel/

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

Successfully merging this pull request may close these issues.

Add a redis cache to speed up the execution of common requests

2 participants