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

Rework RPC caching #3771

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Rework RPC caching #3771

wants to merge 2 commits into from

Conversation

hyphenized
Copy link
Collaborator

This streamlines RPC caching by consolidating balance and hasCode caches into a single unified map. Caching TTL can now be configured more flexibly per method inside #cacheSettings.

The current caching mechanism does not prevent request duplication within batches but that can be implemented afterwards

To test

  • Update extension, check cache cleanups are being logged

This streamlines RPC caching by consolidating balance and hasCode caches into
a single unified map. Caching TTL can now be configured more flexibly per
method inside `#cacheSettings`.

The current caching mechanism does not prevent request duplication but that can
be implemented afterwards
@hyphenized hyphenized self-assigned this Jan 31, 2025
@hyphenized
Copy link
Collaborator Author

I think this one is relatively safe to merge, but the next set of changes will have to wait until e2e's are passing

Copy link
Contributor

@Shadowfiend Shadowfiend left a comment

Choose a reason for hiding this comment

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

Need to read a little more here; I basically hate this as much as I hated the previous cache but still don't have a better idea 😆

Will try to wrap up review tomorrow.

}

if (typeof val === "bigint") {
return `bigint:${val}`
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we never deserialize, can this just be ${val}n?

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