This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We 'preload' most CIDs we interact with on the network. In some cases this can mean preloading the same CID over and over again which is not necessary. This PR adds a LRU cache to the preloader with a default size of 1000. The cache is used to avoid re-preloading the same CID over and over again until it drops out of the cache. We use a cache that will evict CIDs over time to have some sort of upper bound on memory usage. Fixes #3307 Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
- Loading branch information
1 parent
a542882
commit b5ea76a
Showing
2 changed files
with
45 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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