Cache status.json for 5 seconds in Apache

There's no need to actually serve to-the-second accurate status.json
content. Cache it in Apache.

Closes-bug: 1326170
Change-Id: If3bc44b781ce4e12ac95d3929242ec0c912f0010
This commit is contained in:
Monty Taylor 2014-06-04 01:52:32 +02:00
parent 0812bb7f67
commit 3c21c650af
2 changed files with 17 additions and 0 deletions

View File

@ -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,
}
}
}

View File

@ -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/
<IfModule mod_cache.c>
CacheDefaultExpire 5
<IfModule mod_mem_cache.c>
CacheEnable mem /status.json
</IfModule>
</IfModule>
</VirtualHost>