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:
parent
d9b95fdfb4
commit
f73456a123
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user