Skip to content
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

refactor(core-api): implement a cache service to DRY the server method logic #1930

Merged
merged 2 commits into from
Jan 3, 2019

Conversation

faustbrian
Copy link
Contributor

Proposed changes

While looking into an issue in core-api I noticed that the server method cache could need some cleanup.

Types of changes

  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes

@faustbrian faustbrian requested a review from spkjp January 3, 2019 08:11
@ghost ghost assigned faustbrian Jan 3, 2019
@ghost ghost added the review label Jan 3, 2019
@codecov-io
Copy link

Codecov Report

Merging #1930 into develop will increase coverage by 0.66%.
The diff coverage is 6.49%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1930      +/-   ##
===========================================
+ Coverage    39.83%   40.49%   +0.66%     
===========================================
  Files          327      350      +23     
  Lines         7476     7561      +85     
  Branches      1120     1135      +15     
===========================================
+ Hits          2978     3062      +84     
+ Misses        4485     4484       -1     
- Partials        13       15       +2
Impacted Files Coverage Δ
...kages/core-api/src/versions/2/shared/controller.ts 0% <ø> (ø) ⬆️
packages/core-api/src/services/transformer.ts 0% <ø> (ø) ⬆️
packages/core-p2p/src/peer.ts 19.1% <ø> (ø) ⬆️
...2p/src/server/versions/internal/handlers/rounds.ts 0% <ø> (ø) ⬆️
packages/core-transaction-pool/src/connection.ts 6.54% <ø> (ø) ⬆️
packages/core-p2p/src/monitor.ts 0% <ø> (ø) ⬆️
packages/core-vote-report/src/handler.ts 100% <ø> (ø) ⬆️
packages/core-api/src/versions/2/votes/methods.ts 0% <0%> (ø) ⬆️
...es/core-api/src/versions/1/transactions/methods.ts 0% <0%> (ø) ⬆️
...es/core-api/src/versions/2/transactions/methods.ts 0% <0%> (ø) ⬆️
... and 37 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 dfa3881...ef0ea1b. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Jan 3, 2019

Codecov Report

Merging #1930 into develop will increase coverage by 0.65%.
The diff coverage is 6.41%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1930      +/-   ##
===========================================
+ Coverage    39.83%   40.49%   +0.65%     
===========================================
  Files          327      350      +23     
  Lines         7476     7562      +86     
  Branches      1120     1108      -12     
===========================================
+ Hits          2978     3062      +84     
  Misses        4485     4485              
- Partials        13       15       +2
Impacted Files Coverage Δ
...kages/core-api/src/versions/2/shared/controller.ts 0% <ø> (ø) ⬆️
packages/core-api/src/services/transformer.ts 0% <ø> (ø) ⬆️
packages/core-p2p/src/peer.ts 19.1% <ø> (ø) ⬆️
...2p/src/server/versions/internal/handlers/rounds.ts 0% <ø> (ø) ⬆️
packages/core-transaction-pool/src/connection.ts 6.54% <ø> (ø) ⬆️
packages/core-p2p/src/monitor.ts 0% <ø> (ø) ⬆️
packages/core-vote-report/src/handler.ts 100% <ø> (ø) ⬆️
packages/core-api/src/versions/2/votes/methods.ts 0% <0%> (ø) ⬆️
...es/core-api/src/versions/1/transactions/methods.ts 0% <0%> (ø) ⬆️
...es/core-api/src/versions/2/transactions/methods.ts 0% <0%> (ø) ⬆️
... and 37 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 dfa3881...ef0ea1b. Read the comment docs.

@faustbrian faustbrian merged commit 13bc930 into develop Jan 3, 2019
@ghost ghost removed the review label Jan 3, 2019
@faustbrian faustbrian deleted the refactor/api-cache-service branch January 3, 2019 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants