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

Use global cache passed through corestore if available #163

Merged
merged 5 commits into from
Jul 16, 2024
Merged

Conversation

HDegroote
Copy link
Contributor

Relies on holepunchto/hypercore#535 and holepunchto/corestore#94 (so draft PR)

Exposes the globalCache on its autocore sessions, if the corestore it was passed exposes it. This makes them compatible with the hypercore (with the linked PR). In particular, views generated from this autobase will use the globalCache (assuming hyperbee PR holepunchto/hyperbee#161 is used).

This makes the maxCacheSize opt redundant, so I removed it. Technically this is a breaking change, but it was an unofficial option anyway (and no harm done if it's still passed in, it's just ignored).

index.js Show resolved Hide resolved
@mafintosh mafintosh marked this pull request as ready for review July 16, 2024 09:31
@mafintosh mafintosh merged commit fe0485e into main Jul 16, 2024
4 checks passed
@mafintosh mafintosh deleted the global-cache branch July 16, 2024 09:31
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