Skip to content

refactor: remove redundant localEnsCache and add TTL expiration#569

Open
rickstaa wants to merge 3 commits intofeat/improve-treasury-votes-caching-behaviorfrom
feat/ens-cache-improvements
Open

refactor: remove redundant localEnsCache and add TTL expiration#569
rickstaa wants to merge 3 commits intofeat/improve-treasury-votes-caching-behaviorfrom
feat/ens-cache-improvements

Conversation

@rickstaa
Copy link
Member

@rickstaa rickstaa commented Mar 3, 2026

Summary

  • Removed the redundant localEnsCache object — results are already stored in the module-level ensCache, so we read directly from it via getCachedEns instead of maintaining a duplicate
  • Added 30-minute TTL expiration (ENS_CACHE_TTL_MS) so stale ENS names are automatically refreshed rather than persisting indefinitely within a session

Test plan

  • Navigate to a treasury proposal and verify ENS names still load correctly in the vote table
  • Navigate away and back — names should load instantly from cache
  • Confirm no regressions in vote display

🤖 Generated with Claude Code

Remove the duplicate localEnsCache object in favor of reading directly
from the module-level cache. Add 30-minute TTL expiration so stale ENS
names are automatically refreshed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rickstaa rickstaa requested a review from ECWireless as a code owner March 3, 2026 09:24
@vercel
Copy link
Contributor

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer-arbitrum-one Ready Ready Preview, Comment Mar 3, 2026 0:36am

Request Review

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Improve naming of ens cache items to reflect that they can store both a
name and address.

Co-authored-by: jipstavenuiter <jipstavenuiter@gmail.com>
@ECWireless
Copy link
Collaborator

@rickstaa can this be closed given #572

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