diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index 26525f826a..537a2d5b34 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -278,4 +278,14 @@ class zuul ( ensure => present, } } + if ! defined(A2mod['cache']) { + a2mod { 'cache': + ensure => present, + } + } + if ! defined(A2mod['mem_cache']) { + a2mod { 'mem_cache': + ensure => present, + } + } } diff --git a/modules/zuul/templates/zuul.vhost.erb b/modules/zuul/templates/zuul.vhost.erb index e38d6efff9..86a89cb79c 100644 --- a/modules/zuul/templates/zuul.vhost.erb +++ b/modules/zuul/templates/zuul.vhost.erb @@ -23,4 +23,11 @@ AliasMatch ^/p/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/lib/zuul/git/$1 ScriptAlias /p/ /usr/lib/git-core/git-http-backend/ + + CacheDefaultExpire 5 + + CacheEnable mem /status.json + + +