dcrdata
dcrdata copied to clipboard
Last-Modified and ETag headers especially in mempool responses
Also support the If-None-Match and If-Modified-Since request headers, so the client can receive a 304 instead of the old data, saving everyone compute resources and bandwidth.
Also, Cache-Control:private
Expires is not likely to be useful except perhaps for mempool. Conditional requests are likely to be of more use:
- content based w/
ETagresponse header andIf-None-Matchrequest header - time based w/
Last-Modifiedresponse header andIf-Modified-Sincerequest header
In these cases, a 304 code and an empty body are returned to indicate to the client to use their cache.
Hi @chappjc I have replicated this from my end. That GETs return 200 even with non-changed content. Can I pick this up? Thanks
Yes, please do, @njirap. Although please draft an informal but detailed ConOps describing the specific goals and intended use case for the solution you come up with.
Ok let me work on that. Thanks.