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

sdk/params: add lazy caching with LRU #3023

Open
moul opened this issue Oct 25, 2024 · 0 comments
Open

sdk/params: add lazy caching with LRU #3023

moul opened this issue Oct 25, 2024 · 0 comments

Comments

@moul
Copy link
Member

moul commented Oct 25, 2024

sdk/params will be used in various parts of the project to enable dynamic configuration of the chain, controlled by GovDAO.
To avoid managing event-based logic and to ensure good performance, we should implement a lazy caching mechanism for sdk/params.

This mechanism will allow each call to the param getters to first check the cache and return the value if it is available. If not, it will retrieve the value from the store and save it in the cache. We should also implement automatic cache invalidation at the end of the block when a variable changes.
Additionally, there should be an LRU system that allows a node operator to select a maximum cache size.

Related with #3003

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

No branches or pull requests

1 participant