Add support for [cache] backend_expiration_time

Depends-on: https://review.opendev.org/933978
Change-Id: Ia4637623fcaff1600bbf72bb9fc65f5befe94b0d
This commit is contained in:
Takashi Kajinami 2024-11-03 09:20:25 +09:00
parent 99a65ade55
commit 77e67abc75
3 changed files with 14 additions and 0 deletions

View File

@ -18,6 +18,11 @@
# (integer value)
# Defaults to $facts['os_service_default']
#
# [*backend_expiration_time*]
# (Optional) Expiration time in cache backend to purge expired records
# automatically.
# Defaults to $facts['os_service_default']
#
# [*backend*]
# (Optional) Dogpile.cache backend module. It is recommended that
# Memcache with pooling (oslo_cache.memcache_pool) or Redis
@ -242,6 +247,7 @@
class heat::cache (
$config_prefix = $facts['os_service_default'],
$expiration_time = $facts['os_service_default'],
$backend_expiration_time = $facts['os_service_default'],
$backend = $facts['os_service_default'],
$backend_argument = $facts['os_service_default'],
$proxies = $facts['os_service_default'],
@ -292,6 +298,7 @@ class heat::cache (
oslo::cache { 'heat_config':
config_prefix => $config_prefix,
expiration_time => $expiration_time,
backend_expiration_time => $backend_expiration_time,
backend => $backend,
backend_argument => $backend_argument,
proxies => $proxies,

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``heat::cache::backend_expiration_time`` parameter has been added.

View File

@ -13,6 +13,7 @@ describe 'heat::cache' do
is_expected.to contain_oslo__cache('heat_config').with(
:config_prefix => '<SERVICE DEFAULT>',
:expiration_time => '<SERVICE DEFAULT>',
:backend_expiration_time => '<SERVICE DEFAULT>',
:backend => '<SERVICE DEFAULT>',
:backend_argument => '<SERVICE DEFAULT>',
:proxies => '<SERVICE DEFAULT>',
@ -65,6 +66,7 @@ describe 'heat::cache' do
{
:config_prefix => 'prefix',
:expiration_time => 3600,
:backend_expiration_time => 7200,
:backend => 'oslo_cache.memcache_pool',
:proxies => ['proxy01:8888', 'proxy02:8888'],
:enabled => true,
@ -110,6 +112,7 @@ describe 'heat::cache' do
is_expected.to contain_oslo__cache('heat_config').with(
:config_prefix => 'prefix',
:expiration_time => 3600,
:backend_expiration_time => 7200,
:backend => 'oslo_cache.memcache_pool',
:backend_argument => '<SERVICE DEFAULT>',
:proxies => ['proxy01:8888', 'proxy02:8888'],