You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ads-client): respect server max-age in cache TTL resolution (#7344)
* feat(ads-client): respect server max-age in cache TTL resolution
Resolve effective TTL by priority via a new EffectiveTtl helper —
explicit per-request TTL wins, otherwise the response's
Cache-Control: max-age is used, otherwise the configured default_ttl.
Previously the layer took the min of all three, which collapsed to the
short default_ttl in practice and ignored the server's max-age signal.
AC-103
* feat(ads-client): cap effective cache TTL at 7 days
Apply a 7-day ceiling to the resolved effective TTL regardless of
source. Without it, a misconfigured server max-age (e.g. years) or an
oversized caller/default value would persist responses far longer than
is reasonable for this cache.
AC-103
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,9 @@
13
13
14
14
## ✨ What's New ✨
15
15
16
+
### Ads Client
17
+
* HTTP cache TTL is now resolved by priority — explicit per-request TTL (if any) wins, otherwise the response's `Cache-Control: max-age` is used, otherwise the configured `default_ttl`. The resolved TTL is capped at 7 days as a safety net against misconfigured server values. Previously the layer took the minimum of all three, which effectively ignored the server's `max-age` signal.
18
+
16
19
### Remote Settings
17
20
* Add uptake telemetry support ([#7288](https://github.com/mozilla/application-services/pull/7288))
0 commit comments