-
-
Notifications
You must be signed in to change notification settings - Fork 126
perf: drop moka, use PortableCache as the sole in-process cache backend #860
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4426bae
perf: drop moka, use PortableCache as the sole in-process cache backend
claude adc2221
ci: drop the obsolete moka-cache wasm build step
claude e6508c9
fix(portable_cache): address PortableCache parity gaps from review
claude 7abc954
fix(diagnostics): use backend-neutral cache-bucket headings
claude a60ef97
fix(portable_cache): reliable awaited snapshot for SKDM invalidation
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,7 @@ | ||
| //! Unified cache type backed by moka or [`PortableCache`](crate::portable_cache::PortableCache). | ||
| //! The client's in-process cache type. | ||
| //! | ||
| //! The selection below is target-gated, not just feature-gated, because moka is | ||
| //! thread-based (crossbeam/uuid) and can't build on wasm32: a defaults-based wasm32 | ||
| //! build must fall back to PortableCache instead of failing deep inside moka's deps. | ||
| //! Backed by [`PortableCache`](crate::portable_cache::PortableCache): a | ||
| //! runtime-agnostic cache (capacity + TTL/TTI eviction, single-flight | ||
| //! `get_with`) that builds on every target, including wasm32. | ||
|
|
||
| #[cfg(all(feature = "moka-cache", not(target_arch = "wasm32")))] | ||
| mod inner { | ||
| pub type Cache<K, V> = moka::future::Cache<K, V>; | ||
| } | ||
|
|
||
| #[cfg(any(not(feature = "moka-cache"), target_arch = "wasm32"))] | ||
| mod inner { | ||
| pub type Cache<K, V> = crate::portable_cache::PortableCache<K, V>; | ||
| } | ||
|
|
||
| pub use inner::Cache; | ||
| pub use crate::portable_cache::PortableCache as Cache; | ||
|
jlucaso1 marked this conversation as resolved.
jlucaso1 marked this conversation as resolved.
jlucaso1 marked this conversation as resolved.
jlucaso1 marked this conversation as resolved.
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.