-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add generic Ordered Cache behaviour and implementation #2497
Conversation
f9efd1e
to
050ec55
Compare
Pull Request Test Coverage Report for Build 2993a38b-976b-44f3-a470-85e738b27086
💛 - Coveralls |
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.
@pasqu4le I installed this cache generalization to stg server and the issue is that after a while the price and marketcap charts disappear together with the values at the bottom of charts. I am not sure that exactly this PR caused this problem, but I guess it could be since we recently implemented a cache for charts data #2035. You can reproduce the behaviour in the stg server.
@vbaranov I don't how it's possible for this PR to be the cause. Also indirectly there does not seem to be any correlation. P.s. It's probably a good idea to write a general macro for this type of caches that store only a finite number of "points". With it and the one in this PR we'd probably cover them all, I'll work on it and make a separate PR. |
050ec55
to
077b51c
Compare
@pasqu4le could you please fix |
Problem: multiple caches exist to keep a page of the most recent `n` elements. More are to be implemented, so it would be good to abstract their implementation. Solution: add a behaviour and a macro (providing an implementation) to create this type of caches. Redefine the existing ones using the new macro.
a17dfed
to
b52d10b
Compare
@vbaranov sorry about that, they are fixed now |
Motivation
Part of #2427
Multiple caches exist to keep a page of the most recent
n
elements.More are to be implemented, so it would be good to abstract their implementation.
Changelog
Enhancements
This PR adds a behaviour and a macro (providing an implementation) to create this type of caches.
It also redefines the existing ones using the new macro.
Checklist for your PR
Note: I did not write tests for the new module. however the existing tests for the transactions and blocks caches should cover the most important cases
CHANGELOG.md
with this PR