feat: improve ens caching of treasury votes table#561
Open
ECWireless wants to merge 3 commits intomainfrom
Open
feat: improve ens caching of treasury votes table#561ECWireless wants to merge 3 commits intomainfrom
ECWireless wants to merge 3 commits intomainfrom
Conversation
Co-authored-by: Rick Staa <rick.staa@outlook.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a module-level ENS lookup cache for the TreasuryVoteTable to reduce repeated ENS provider calls across re-renders/navigations.
Changes:
- Introduces a bounded module-level Map cache for resolved ENS names (with LRU-like eviction).
- Adds in-flight request de-duplication so concurrent lookups for the same address share a single promise.
- Updates Apollo query
fetchPolicyfor treasury votes/events to"cache-and-network".
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Co-authored-by: Rick Staa rick.staa@outlook.com
Description
Module-level cache to avoid repeated ENS lookups across renders/navigations.
Type of Change
Related Issue(s)
Related: #539
^ closes and replaces the above PR
Changes Made
TreasuryVoteTableENS_CACHE_MAX_ENTRIESfor edge case memory bloatingTesting
How to test (optional unless test is not trivial)
Impact / Risk
Risk level: Low
Impacted areas: UI
User impact: faster ens name loads
Rollback plan: hotfix or Vercel rollback
Screenshots / Recordings (if applicable)
NA
Additional Notes
NA