-
Notifications
You must be signed in to change notification settings - Fork 118
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
feat: add cache control to /extended/v1/tx/:tx_id
#1229
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1229 +/- ##
==========================================
+ Coverage 76.16% 76.25% +0.08%
==========================================
Files 96 96
Lines 9748 9772 +24
Branches 1983 1989 +6
==========================================
+ Hits 7425 7452 +27
+ Misses 2209 2207 -2
+ Partials 114 113 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice optimization!
# [4.1.0](v4.0.4...v4.1.0) (2022-07-07) ### Features * add cache control to `/extended/v1/tx/:tx_id` ([#1229](#1229)) ([8d5ca2c](8d5ca2c))
🎉 This PR is included in version 4.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Adds
ETag
header to/extended/v1/tx/:tx_id
and/extended/v1/tx/:tx_id/raw
.Since transactions can be in the mempool or in the chain and they can later get re-orged, a new
ETagType.transaction
was added which builds the ETag using thetx_id
,index_block_hash
(if any),microblock_hash
(if any), andstatus
of the relevant transaction. This way, we'll get the best caching behavior even when the tx may be moved from block to microblock to mempool and back.Closes #1225