-
Notifications
You must be signed in to change notification settings - Fork 72
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
API responses can't be cached #26
Comments
2 is very possible with something like a block reorg. We can safely let them expire on their own. |
One option we have for this is to call the API through a gateway and let it handle the caching (AWS can go up to an hour) The obvious solution is to use a NoSQL database, cache by Note that both solutions are cloud provider-specific. |
An implementation that supports the AWS, Azure and GCP can use the redis services that are provided as a service on the three providers: We will have code specific for each provider but at the end it is the same core product, redis, using it as as key, value pair. |
This will be easier to implement if we migrate to bare Terraform, which is currently being worked on |
We'll probably not support this for the containerized version (at least initially) |
0.7.0 allows caching in the global scope with no hard guarantees. Closing this issue in line with the changes in how we use Github issues internally. |
Description
API calls may or may not be idempotent so the API provider might not want to make duplicate API calls between serverless function invocations while the transaction is pending. The API response needs to be optionally cached.
The cache should store the following information against the
requestId
:_path
or the errorCache keys need to have an expiration mechanism too.
Before making an API call, the cache should be checked for the
requestId
. If a value is found, skip making that call and attempt another transaction with that value.API calls should default to cached if a cache is configured. Otherwise, a new call should be made each serverless invocation.
Questions
requestid
exists in the cache, but no unfulfilled request is found?The text was updated successfully, but these errors were encountered: