Add option to make cache expiration configurable

This commit adds a cache_expiration parameter to make the cache
expiration for the api configurable. By default it sets it 15min
(which is half of the far more conservative openstack-health default)
to match the longest e-r query times seen in testing.

Change-Id: Iaea17e16f6995121ad54bae2c46a96112b702caf
This commit is contained in:
Matthew Treinish 2016-05-25 13:49:46 -04:00
parent aad1f6a6f8
commit a5c17a8719
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
2 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,7 @@ class openstack_health::api(
$elastic_recheck_dir = '/opt/elastic-recheck',
$elastic_recheck_repo = 'https://git.openstack.org/openstack-infra/elastic-recheck',
$elastic_recheck_revision = 'master',
$cache_expiration = 900,
) {
include ::httpd::mod::wsgi

View File

@ -1,5 +1,6 @@
[default]
query_dir = <%= @elastic_recheck_dir %>/queries
cache_expiration = <%= @cache_expiration %>
db_uri = <%= scope.lookupvar("openstack_health::api::db_uri") %>
<% if @ignored_keys.length > 0 -%>
ignored_run_metadata_keys =