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

Support for Redis caching of query response #726

Open
robd003 opened this issue Sep 24, 2020 · 2 comments
Open

Support for Redis caching of query response #726

robd003 opened this issue Sep 24, 2020 · 2 comments
Projects
Milestone

Comments

@robd003
Copy link

robd003 commented Sep 24, 2020

I was wondering if there was a suggested way to cache a query response from GINO using redis. It would be great to have redis support built in so that repeated calls from clients getting the exact same results would hit the cache rather than cause a thundering herd to the DB.

@gazorby
Copy link

gazorby commented Sep 24, 2020

I'm not sure the caching feature has its place in GINO since it's not really related to the db interaction. You could try using async-caches, I use it in my own framework for this exact purpose and it works great.

@fantix
Copy link
Member

fantix commented Sep 25, 2020

@gazorby thanks for the suggestion! You're right, Redis caching would be probably not included in GINO.

However, I'm thinking it might be a handy design to build a slot in baked query API to plug-in caching support. It doesn't look easy now, but I do want to add this slot in 1.4/2.0. So please keep this issue open, thanks for proposing!

@fantix fantix added this to To Do in GINO 2 via automation Sep 25, 2020
@fantix fantix added this to the GINO 1.4 milestone Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
GINO 2
  
To Do
Development

No branches or pull requests

3 participants