Merge "Add support for [cache] backend_expiration_time"

This commit is contained in:
Zuul 2024-11-05 11:25:33 +00:00 committed by Gerrit Code Review
commit 327c0a53d5
3 changed files with 15 additions and 0 deletions

View File

@ -17,6 +17,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
@ -243,6 +248,7 @@
class keystone::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'],
@ -306,6 +312,7 @@ class keystone::cache(
oslo::cache { 'keystone_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,5 @@
---
features:
- |
The new ``keystone::cache::backend_expiration_time`` parameter has been
added.

View File

@ -20,6 +20,7 @@ describe 'keystone::cache' do
is_expected.to contain_oslo__cache('keystone_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>',
@ -66,6 +67,7 @@ describe 'keystone::cache' do
{
:config_prefix => 'prefix',
:expiration_time => 3600,
:backend_expiration_time => 7200,
:backend => 'oslo_cache.memcache_pool',
:proxies => ['proxy01:8888', 'proxy02:8888'],
:enabled => true,
@ -118,6 +120,7 @@ describe 'keystone::cache' do
is_expected.to contain_oslo__cache('keystone_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'],