max-stale 是 HTTP 缓存控制指令(出现在 Cache-Control 头中),表示客户端愿意接受“已过期(stale)”的缓存响应。它可以不带值(接受任意过期时长),也可以带一个秒数值(只接受在该秒数范围内过期的响应)。常见于提升可用性、降低延迟或在网络不稳定时继续使用缓存内容。
/ˌmæks ˈsteɪl/
The app sends Cache-Control: max-stale so it can show cached data even when the network is slow.
这个应用发送 Cache-Control: max-stale,这样即使网络很慢也能显示缓存数据。
In a constrained network environment, the client may include max-stale=60 to tolerate responses that expired within the last minute, trading freshness for reliability.
在受限的网络环境中,客户端可能加入 max-stale=60 来容忍在过去 1 分钟内过期的响应,以可靠性换取一定的新鲜度。
该短语由 max(maximum,“最大”)与 stale(“不新鲜的、过期的”)组合而成;在 HTTP 语境中,stale 专指“超过缓存新鲜度(freshness lifetime)后仍被使用的响应”。作为标准化术语,它主要源自 HTTP 缓存规范对“过期内容可否被接受”的精确定义。
max-stale 的语义与用法有正式定义)max-stale)