File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ CACHE_MAX_SIZE=${CACHE_MAX_SIZE:-32g}
102
102
103
103
# The cache directory. This can get huge. Better to use a Docker volume pointing here!
104
104
# Set to 32gb which should be enough
105
- echo " proxy_cache_path /docker_mirror_cache levels=1:2 max_size=$CACHE_MAX_SIZE inactive=60d keys_zone=cache:10m use_temp_path=off;" > /etc/nginx/conf.d/cache_max_size.conf
105
+ echo " proxy_cache_path /docker_mirror_cache levels=1:2 max_size=$CACHE_MAX_SIZE min_free= ${CACHE_MIN_FREE :- 1g} inactive=${CACHE_INACTIVE_TIME :- 60d} keys_zone=cache:15m use_temp_path=off manager_threshold= ${CACHE_MANAGER_THRESHOLD :- 1000ms} manager_sleep= ${CACHE_MANAGER_SLEEP :- 250ms} manager_files= ${CACHE_MANAGER_FILES :- 100} loader_files= ${CACHE_LOADER_FILES :- 100} loader_threshold= ${CACHE_LOADER_THRESHOLD :- 200ms} loader_sleep= ${CACHE_MANAGER_SLEEP :- 50ms} ;" > /etc/nginx/conf.d/cache_max_size.conf
106
106
107
107
# Manifest caching configuration. We generate config based on the environment vars.
108
108
echo -n " " > /etc/nginx/nginx.manifest.caching.config.conf
Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ echo "Docker configured with HTTPS_PROXY=$scheme://$http_host/"
317
317
proxy_cache cache;
318
318
# But we store the result with the cache key of the original request URI
319
319
# so that future clients don't need to follow the redirect too
320
- proxy_cache_key $original_uri ;
320
+ proxy_cache_key $original_uri$slice_range ;
321
321
}
322
322
323
323
# by default, dont cache anything.
Original file line number Diff line number Diff line change 3
3
add_header X-Docker-Registry-Proxy-Cache-Type "$docker_proxy_request_type";
4
4
proxy_pass https://$targetHost;
5
5
proxy_cache cache;
6
- proxy_cache_key $uri;
6
+ slice 4m;
7
+ proxy_cache_key $uri$slice_range;
8
+ proxy_set_header Range $slice_range;
9
+ proxy_http_version 1.1;
7
10
proxy_intercept_errors on;
8
11
error_page 301 302 307 = @handle_redirects;
You can’t perform that action at this time.
0 commit comments