-
Notifications
You must be signed in to change notification settings - Fork 236
Closed
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps updif/expertExtensive knowledge (implications, ramifications) requiredExtensive knowledge (implications, ramifications) requiredhelp wantedneed/analysisNeeds further analysis before proceedingNeeds further analysis before proceedingneed/community-inputNeeds input from the wider communityNeeds input from the wider communitytopic/http-apiTopic http-apiTopic http-api
Description
Reframe spec was added in #272, and it includes HTTP as an interoperable way of sending request-response dag-json messages.
Problem
Reframe messages used in contexts like indexers are queries, being able to cache popular responses could significantly reduce the cost and improve performance when running an indexer or a similar service.
Initial spec in #272 requested all requests to be over HTTP POST method.
Caching in POST-only API will be... really tricky:
- POST is not idempotent and not "cacheable" by default, or at least not the way one would think.
- Specs are vague around this, but in practice clients and CDNs work more or less like this:
- HTTP Caching model is around "resources", not "responses":
- if you set
Cache-ControlorExpiresheaders AND setContent-Locationon POST response, then response payload will be cached and returned for any future GET requests to theContent-Location– bit sketchy, and may not work this way everywhere - POST requests will not benefit from any preexisting cache, because they potentially mutate the resource, overriding anything that was cached.
Search for solution
Ideas welcome, feel free to comment below
Metadata
Metadata
Assignees
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps updif/expertExtensive knowledge (implications, ramifications) requiredExtensive knowledge (implications, ramifications) requiredhelp wantedneed/analysisNeeds further analysis before proceedingNeeds further analysis before proceedingneed/community-inputNeeds input from the wider communityNeeds input from the wider communitytopic/http-apiTopic http-apiTopic http-api