trustbloc / sidetree-fabric

Implementation of Sidetree with a backing Hyperledger Fabric ledger
Apache License 2.0
26 stars 13 forks source link

feat: Implemented document cache #472

Closed bstasyszyn closed 3 years ago

bstasyszyn commented 3 years ago

Documents are now cached the first time they are resolved. Subsequent requests for documents are retrieved from the cache. A cached document is invalidated by the Observer if an operation is applied to the document.

closes #413

Signed-off-by: Bob Stasyszyn Bob.Stasyszyn@securekey.com

codecov[bot] commented 3 years ago

Codecov Report

Merging #472 (07e15e9) into master (8a471a2) will decrease coverage by 0.01%. The diff coverage is 91.17%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #472      +/-   ##
==========================================
- Coverage   92.36%   92.35%   -0.02%     
==========================================
  Files          79       81       +2     
  Lines        3116     3242     +126     
==========================================
+ Hits         2878     2994     +116     
- Misses        158      165       +7     
- Partials       80       83       +3     
Impacted Files Coverage Δ
pkg/context/context.go 100.00% <ø> (ø)
pkg/observer/processor.go 84.89% <84.89%> (ø)
pkg/context/doccache/doccache.go 93.87% <93.87%> (ø)
pkg/observer/observer.go 96.92% <100.00%> (+6.06%) :arrow_up:
pkg/peer/init.go 100.00% <100.00%> (ø)
pkg/peer/sidetreesvc/channelctrl.go 85.76% <100.00%> (+0.10%) :arrow_up:
pkg/peer/sidetreesvc/context.go 75.55% <100.00%> (+0.55%) :arrow_up:
pkg/peer/sidetreesvc/observerctrl.go 100.00% <100.00%> (ø)
pkg/peer/sidetreesvc/restsvc.go 95.00% <100.00%> (+0.06%) :arrow_up:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8a471a2...07e15e9. Read the comment docs.