mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-07 00:05:02 -04:00
response_cache: an immutable response is always fresh
This commit is contained in:
parent
5c2f8ab0b1
commit
3df6edbcfc
@ -140,6 +140,8 @@ module HTTPX
|
|||||||
if cache_control
|
if cache_control
|
||||||
return false if cache_control.include?("no-cache")
|
return false if cache_control.include?("no-cache")
|
||||||
|
|
||||||
|
return true if cache_control.include?("immutable")
|
||||||
|
|
||||||
# check age: max-age
|
# check age: max-age
|
||||||
max_age = cache_control.find { |directive| directive.start_with?("s-maxage") }
|
max_age = cache_control.find { |directive| directive.start_with?("s-maxage") }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user