Repository navigation
feat(updater)!: cache update checks in memory #3639
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
Open
beanow-at-crabnebula
wants to merge
22
commits into
tauri-apps:v2
Choose a base branch
from
beanow-at-crabnebula:beanow/updater-cache
base: v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b8b5f60
feat(updater)!: cache update checks in memory
beanow-at-crabnebula 6d75e55
feat(updater): expose cache modes for individual checks
beanow-at-crabnebula 656521a
test(updater): cover cache policy and manifest requests
beanow-at-crabnebula d61ab66
docs(updater): explain caching and demonstrate cache modes
beanow-at-crabnebula 4d68528
chore: document public cache types
beanow-at-crabnebula 03a14b2
doc: give basic README explanation of caching
beanow-at-crabnebula fb3054c
chore(updater): use released http-cache crates
beanow-at-crabnebula 4590e47
Merge upstream v2 into beanow/updater-cache
beanow-at-crabnebula be51d06
chore(updater): change the default to opt-in on this release
beanow-at-crabnebula ad1824b
Merge branch 'v2' into beanow/updater-cache
beanow-at-crabnebula 8b4f552
chore(updater): comment what CacheMode does first, then recommendations
beanow-at-crabnebula 5e93e70
chore(updater): rename cache config to enabled and enabledByDefault
beanow-at-crabnebula aa7b4bf
feat(updater): gate the HTTP cache behind a `cache` cargo feature
beanow-at-crabnebula 83d2776
ci: lint and test the updater without its `cache` feature
beanow-at-crabnebula 0268928
Merge branch 'v2' into beanow/updater-cache
beanow-at-crabnebula 301a33f
test(updater): use a separate cache per server in the default TTL test
beanow-at-crabnebula d9e806a
feat(updater): use QuickManager instead of moka for the HTTP cache
beanow-at-crabnebula 04bb732
Merge branch 'v2' into beanow/updater-cache
beanow-at-crabnebula 0b0ebc1
feat(updater): disable the `cache` feature by default
beanow-at-crabnebula e82df8b
Merge branch 'beanow/updater-cache' of github.com:beanow-at-crabnebul…
beanow-at-crabnebula 2b528b7
chore(updater): bump HTTP cache packages
beanow-at-crabnebula 62913b6
chore(updater): merge upstream v2
beanow-at-crabnebula 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
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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| "updater": minor | ||
| "updater-js": minor | ||
| --- | ||
|
|
||
| - Added an in-memory HTTP cache for update checks (downloads are not cached), behind the new `cache` cargo feature (enabled by default). Without it, caching is compiled out and `cacheMode` has no effect. | ||
| - New `plugins.updater.cache` config: `enabledByDefault` and `maxTtlMins` (defaults to 12 hours). | ||
| - The JS `check` command has a new `cacheMode` option (`default`, `bypass`, `checkNow`). In Rust this is exposed as `UpdaterBuilder::cache_mode_override`. | ||
| - **Behavior change:** Caching is opt-in in this release. You can opt-in with `check({cacheMode: 'checkNow'})`, `cacheMode: 'default'` or set `enabledByDefault = true`. Otherwise the updater behaves the same and transparently skips caching. This is intended as temporary and a future release is expected to change the default! | ||
| - **Rust API change:** Network errors from `check()` now come back as `Error::ReqwestMiddleware(Reqwest(..))` instead of `Error::Reqwest`, so code that matches on the old variant stops matching. |
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
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
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.