mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -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
|
||||
return false if cache_control.include?("no-cache")
|
||||
|
||||
return true if cache_control.include?("immutable")
|
||||
|
||||
# check age: max-age
|
||||
max_age = cache_control.find { |directive| directive.start_with?("s-maxage") }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user