From 35c9783036ced35249cec09de835d7f0428e92d1 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 10 Sep 2020 13:17:18 -0700 Subject: [PATCH] Use LocationMatch to cache zuul api statuses We need a regex to match the url path for zuul statuses. Our existing setup assumed this would work in a CacheEnable directive but it seems that it does not. Move this into a LocationMatch which explicitly supports regexes. Change-Id: I9df06d2af31ce6550e537f4594640487cca1d735 --- playbooks/roles/zuul-web/templates/zuul.vhost.j2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/zuul-web/templates/zuul.vhost.j2 b/playbooks/roles/zuul-web/templates/zuul.vhost.j2 index c46066346d..8f45aaf746 100644 --- a/playbooks/roles/zuul-web/templates/zuul.vhost.j2 +++ b/playbooks/roles/zuul-web/templates/zuul.vhost.j2 @@ -56,7 +56,9 @@ LogFormat "%h %l %u [%{%F %T}t.%{msec_frac}t] \"%r\" %>s %b %{cache-status}e \"% CacheDefaultExpire 5 # TODO: Should we cache the rest of the API too? - CacheEnable mem /api/tenant/.*/status + + CacheEnable mem + CacheEnable mem /static/ # 80MB max cache size. 10 objects at 8MB max each. MCacheSize 81920 @@ -67,7 +69,9 @@ LogFormat "%h %l %u [%{%F %T}t.%{msec_frac}t] \"%r\" %>s %b %{cache-status}e \"% MCacheMaxStreamingBuffer 8388608 - CacheEnable disk /api/tenant/.*/status + + CacheEnable disk + CacheEnable disk /static/ CacheRoot /var/cache/apache2/mod_cache_disk CacheMaxFileSize 10000000