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

Implement configurable provider record caching #38

Merged
merged 1 commit into from
Jun 13, 2023
Merged

Conversation

masih
Copy link
Member

@masih masih commented Jun 13, 2023

Implement caching mechanism where the entire found provider record is cached regardless of the peerstore state.

Use an adaptive 2Q cache heuristic where burst of unseen keys will not impact popular cache entries.

Implement caching mechanism where the entire found provider record is
cached regardless of the peerstore state.

Use an adaptive 2Q cache heuristic where burst of unseen keys will not
impact popular cache entries.
@masih masih requested a review from willscott June 13, 2023 13:45
cache.go Show resolved Hide resolved
@masih masih merged commit 0b883bb into main Jun 13, 2023
@masih masih deleted the masih/cache_providers branch June 13, 2023 13:58
masih added a commit to ipni/storetheindex that referenced this pull request Jun 13, 2023
Set cache expiry to 24 hours with cache size of 1M. The caching memory
footprint is unclear just now. Further experimentation is needed to
right-size the instance relative to cache size.

Use a reduced cache expiry and size for `dev` environment.

See:
 - ipni/cassette#38
masih added a commit to ipni/storetheindex that referenced this pull request Jun 13, 2023
Set cache expiry to 24 hours with cache size of 1M. The caching memory
footprint is unclear just now. Further experimentation is needed to
right-size the instance relative to cache size.

Use a reduced cache expiry and size for `dev` environment.

See:
 - ipni/cassette#38
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