Enable mod_cache to do API server side caching

This commit adds enabling mod_cache to the api server to enable some
server side caching. We don't need to update the data in real time on
the dashboard and performing some server side caching will improve
the dashboard performance. It'll also decrease the load we'll put on
that poor trove node in rax cloud we're running subunit2sql on.

Change-Id: I61d862603306a36c3ec6cd74d000126155bb29d5
This commit is contained in:
Matthew Treinish 2015-10-16 21:09:58 -04:00
parent d9b95fdfb4
commit f73456a123
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
2 changed files with 20 additions and 0 deletions

View File

@ -66,4 +66,14 @@ class openstack_health::api(
Exec['package-application'],
],
}
if ! defined(Httpd::Mod['cache']) {
httpd::mod { 'cache':
ensure => present,
}
}
if ! defined(Httpd::Mod['cache_disk']) {
httpd::mod { 'cache_disk':
ensure => present,
}
}
}

View File

@ -23,5 +23,15 @@ WSGIPythonHome <%= scope.lookupvar("openstack_health::api::virtualenv_dir") %>
Require all granted
</Directory>
<IfModule mod_cache.c>
<IfModule mod_cache_disk.c>
CacheRoot "/var/cache/apache2/mod_disk_cache"
CacheEnable disk "/"
CacheDirLevels 5
CacheDirLength 3
CacheLock on
</IfModule>
</IfModule>
DocumentRoot <%= scope.lookupvar("openstack_health::api::api_dir") %>
</VirtualHost>