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

fix: lru ttl cache implementation #5997

Merged
merged 11 commits into from
Oct 16, 2024
Merged

Conversation

filvecchiato
Copy link
Contributor

Implements a TTL in the LRU cache used to cache responses in http and ws providers. It allows to also bypass querying the cache in case the users sets the cache size to 0.

@filvecchiato filvecchiato marked this pull request as ready for review October 11, 2024 08:38
@TarikGul
Copy link
Member

I think the tests are hanging.

@filvecchiato
Copy link
Contributor Author

I think the tests are hanging.

Checking them now

Copy link
Member

@TarikGul TarikGul left a comment

Choose a reason for hiding this comment

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

Some nits above. But overall really awesome. thank you 🚀

packages/rpc-provider/src/lru.ts Outdated Show resolved Hide resolved
packages/rpc-core/src/bundle.ts Show resolved Hide resolved
packages/rpc-provider/src/lru.ts Outdated Show resolved Hide resolved
Copy link
Member

@TarikGul TarikGul left a comment

Choose a reason for hiding this comment

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

lgtm, great job 🚀

@TarikGul TarikGul merged commit a3e1499 into polkadot-js:master Oct 16, 2024
4 checks passed
@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants