现在网站设置缓存都是通过 Cache-Control 这个 header,他有很多指令(directive)。
比如 max-age 是指定强缓存的时间,no-cache 是会用本地的缓存但每次都会协商,no-store 是禁用掉缓存。
max-age : 指定时间后(单位为秒)缓存过期
现在网站设置缓存都是通过 Cache-Control 这个 header,他有很多指令(directive)。
比如 max-age 是指定强缓存的时间,no-cache 是会用本地的缓存但每次都会协商,no-store 是禁用掉缓存。
max-age : 指定时间后(单位为秒)缓存过期