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

Block header cached should be refilled if goes over certain threshold - Closes #4793 #4822

Merged
merged 9 commits into from Feb 13, 2020

Conversation

pablitovicente
Copy link
Contributor

@pablitovicente pablitovicente commented Feb 12, 2020

What was the problem?

This PR resolves #4793

How was it solved?

  • By adding minimum and maximum items options to the cache constructor
  • When enough items are removed from the cache and the minimum items value is reached a flag is set
  • When the flag is set the data access layer knows it needs to pull data from the DB and push it to the head of the items array

How was it tested?

  • Unit tests

Copy link
Contributor

@mitsuaki-u mitsuaki-u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sonarcloud
Copy link

sonarcloud bot commented Feb 13, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 2 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@shuse2 shuse2 merged commit f43dea8 into development Feb 13, 2020
@shuse2 shuse2 deleted the 4793-block_header_cached_refill_on_treshold branch February 13, 2020 10:48
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.

Block header cached should be refilled if goes over certain threshold
3 participants