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

Cache idempotent requests responses #9294

Open
abubkr-hago opened this issue Sep 4, 2024 · 4 comments
Open

Cache idempotent requests responses #9294

abubkr-hago opened this issue Sep 4, 2024 · 4 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@abubkr-hago
Copy link

New Feature / Enhancement Checklist

Current Limitation

Idempotent requests are now rejected with a 159 code error,

Feature / Enhancement Description

Instead of rejecting with an error, maybe there is a way to cache the response and respond with it on the next request?.

Example Use Case

A client SDK creates a Test ParseObject but doesn't recieve the response because of a network issue, the SDK tries to create the object again with the same X-Parse-Request-Id header, the server replies with the same object creation response instead of creating a new one.

Alternatives / Workarounds

N/A

3rd Party References

N/A

Copy link

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

@mtrezza
Copy link
Member

mtrezza commented Sep 4, 2024

Could you provide more details in your example use case? Specifically:

the server replies with the same object creation response instead of creating a new one.

@mtrezza mtrezza added the type:feature New feature or improvement of existing feature label Sep 4, 2024
@abubkr-hago
Copy link
Author

I have an android app where I am creating a Post ParseObject, but when connection issues arise creating a post can sometimes return with the error code 159. And then the app will have to figure out how to query this newly crerated post.

I think caching the response server side on the same _Idempotency collection for the same amount of time the ttl is set in the idempotencyOptions configuration... might solve this issue.

@mtrezza
Copy link
Member

mtrezza commented Sep 17, 2024

Got it. This has been discussed in the design of this feature, see #6748 (comment) and #6748 (comment). Maybe @mrmarcsmith would be interested to join this discussion here to find a concept for returning cached responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

2 participants