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

Advice on preventing race conditions caused by multiple calls to the same endpoint made simultaneously (using Redis)? #241

Open
brianjenkins94 opened this issue Nov 14, 2021 · 1 comment

Comments

@brianjenkins94
Copy link

I have a somewhat long-running route that gets paginated data from a third party and uses apicache to cache the result of it. After adding Redis, I've noticed that I don't reliably get back the full dataset from the cache.

It's as if the data that's being cached is being streamed to the database, and the call that gets there second sees that there's one page of data in the cache and uses that as if it were the full response.

I'm working on a minimal sample, but wanted to know if this sounded plausible.

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

1 participant