This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
2021-05-31 18:27:56 +00:00
|
|
|
set $nocache 0; # internal variable for bypassing the cache, nginx expects 0/1 for boolean
|
|
|
|
proxy_cache skynet; # cache name
|
2021-07-30 07:23:04 +00:00
|
|
|
proxy_cache_key $skylink_v1$path$arg_format$arg_attachment$arg_start$arg_end$http_range; # unique cache key
|
2021-08-11 09:48:15 +00:00
|
|
|
proxy_cache_min_uses 3; # cache after 3 uses
|
|
|
|
proxy_cache_valid 200 206 307 48h; # keep 200, 206 and 307 responses valid for up to 2 days
|
2021-05-31 18:27:56 +00:00
|
|
|
proxy_cache_bypass $nocache $cookie_nocache $arg_nocache; # add cache bypass option
|
2020-09-01 13:26:48 +00:00
|
|
|
add_header X-Proxy-Cache $upstream_cache_status; # add response header to indicate cache hits and misses
|