From 243bd42a0737ce520093ec9b842b2c666c7c0bdc Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Fri, 6 Jul 2018 10:48:57 -0400 Subject: [PATCH] Set CacheDefaultExpire for 8001/8002 on mirrors We are actually okay with caching docker things a little longer then the default 1 hour, due to their size and since layers using sha1 hash. Bump the default in this case to 1 day before starting to expire. Change-Id: I5ca7ad30d6bd2228d5e6941acde78ee4a0b0bec8 Signed-off-by: Paul Belanger --- modules/openstack_project/templates/mirror.vhost.erb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/openstack_project/templates/mirror.vhost.erb b/modules/openstack_project/templates/mirror.vhost.erb index 4f0f774d9c..70b81897ac 100644 --- a/modules/openstack_project/templates/mirror.vhost.erb +++ b/modules/openstack_project/templates/mirror.vhost.erb @@ -256,6 +256,10 @@ LogFormat "%h %l %u %t \"%r\" %>s %b %{cache-status}e \"%{Referer}i\" \"%{User-a CacheMaxFileSize 5368709120 # Ignore expire headers as the urls use sha256 hashes. CacheIgnoreQueryString On + # NOTE(pabelanger): In the case of docker, if neither an expiry date nor + # last-modified date are provided default expire to 1 day. This is up from + # 1 hour. + CacheDefaultExpire 86400 CacheStoreExpired On # registry-1.docker.io @@ -314,6 +318,10 @@ LogFormat "%h %l %u %t \"%r\" %>s %b %{cache-status}e \"%{Referer}i\" \"%{User-a CacheMaxFileSize 5368709120 # Ignore expire headers as the urls use sha256 hashes. CacheIgnoreQueryString On + # NOTE(pabelanger): In the case of docker, if neither an expiry date nor + # last-modified date are provided default expire to 1 day. This is up from + # 1 hour. + CacheDefaultExpire 86400 CacheStoreExpired On # NOTE(SamYaple): Docker has historically not allowed to have anything in