Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
b8b5f60
feat(updater)!: cache update checks in memory
beanow-at-crabnebula Sep 24, 2026
6d75e55
feat(updater): expose cache modes for individual checks
beanow-at-crabnebula Sep 24, 2026
656521a
test(updater): cover cache policy and manifest requests
beanow-at-crabnebula Sep 24, 2026
d61ab66
docs(updater): explain caching and demonstrate cache modes
beanow-at-crabnebula Sep 24, 2026
4d68528
chore: document public cache types
beanow-at-crabnebula Sep 24, 2026
03a14b2
doc: give basic README explanation of caching
beanow-at-crabnebula Sep 24, 2026
fb3054c
chore(updater): use released http-cache crates
beanow-at-crabnebula Oct 23, 2026
4590e47
Merge upstream v2 into beanow/updater-cache
beanow-at-crabnebula Oct 23, 2026
be51d06
chore(updater): change the default to opt-in on this release
beanow-at-crabnebula Oct 23, 2026
ad1824b
Merge branch 'v2' into beanow/updater-cache
beanow-at-crabnebula Oct 23, 2026
8b4f552
chore(updater): comment what CacheMode does first, then recommendations
beanow-at-crabnebula Oct 27, 2026
5e93e70
chore(updater): rename cache config to enabled and enabledByDefault
beanow-at-crabnebula Oct 28, 2026
aa7b4bf
feat(updater): gate the HTTP cache behind a `cache` cargo feature
beanow-at-crabnebula Oct 28, 2026
83d2776
ci: lint and test the updater without its `cache` feature
beanow-at-crabnebula Oct 28, 2026
0268928
Merge branch 'v2' into beanow/updater-cache
beanow-at-crabnebula Oct 28, 2026
301a33f
test(updater): use a separate cache per server in the default TTL test
beanow-at-crabnebula Oct 28, 2026
d9e806a
feat(updater): use QuickManager instead of moka for the HTTP cache
beanow-at-crabnebula Oct 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changes/updater-http-cache.md
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.
3 changes: 3 additions & 0 deletions .github/workflows/lint-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ jobs:
# the features of `dialog` cannot all be enabled at once
elif [ "$package" != tauri-plugin-dialog ] && ! $CARGO clippy --package "$package" --target "$TARGET" --all-targets --all-features -- -D warnings; then
failed+=("$package (--all-features)")
# the `cache` feature of `updater` is on in both runs above, lint the build without it too
elif [ "$package" = tauri-plugin-updater ] && ! $CARGO clippy --package "$package" --target "$TARGET" --all-targets --no-default-features --features rustls-tls,system-proxy,zip -- -D warnings; then
failed+=("$package (without cache)")
fi
echo "::endgroup::"
done
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ jobs:
elif [ "$package" = tauri-plugin-single-instance ] && [ "$COMMAND" = test ] && [[ "$TARGET" == *-linux-* ]] \
&& ! dbus-run-session -- $RUNNER test --package "$package" --target "$TARGET" --test dbus_errors --test instance_lock -- --ignored; then
failed+=("$package (D-Bus tests)")
# `--all-features` includes the `cache` feature of `updater`, test the build without it too
elif [ "$package" = tauri-plugin-updater ] \
&& ! $RUNNER $COMMAND --package "$package" --target "$TARGET" --all-targets --no-default-features --features rustls-tls,system-proxy,zip; then
failed+=("$package (without cache)")
fi
echo "::endgroup::"
done
Expand Down
161 changes: 149 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion examples/api/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@
"endpoints": [
"http://localhost:5173/updater-test/updater.json",
"https://tauri-update-server.vercel.app/update/{{target}}/{{current_version}}"
]
],
"cache": {
"enabledByDefault": true,
"maxTtlMins": 180
}
}
},
"bundle": {
Expand Down
Loading