From 8efb48adf44563ebf55b7c99b489f7b85dac4cd2 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 4 Mar 2026 01:45:20 +0900 Subject: [PATCH] Stop passing down tls_enabled argument This argument is implemented in none of the available backends from dogpile. The only usage is found in own memcache_pool backend but the flag can be easily replaced by checking tls_context argument. Change-Id: I8176f427a5906dd68f34a44ee2c200fb76f10220 Signed-off-by: Takashi Kajinami --- oslo_cache/backends/memcache_pool.py | 2 +- oslo_cache/core.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/oslo_cache/backends/memcache_pool.py b/oslo_cache/backends/memcache_pool.py index d789842c..1aee2026 100644 --- a/oslo_cache/backends/memcache_pool.py +++ b/oslo_cache/backends/memcache_pool.py @@ -67,7 +67,7 @@ class PooledMemcachedBackend(memcached_backend.MemcachedBackend): # Composed from GenericMemcachedBackend's and MemcacheArgs's __init__ def __init__(self, arguments: dict[str, Any]) -> None: super().__init__(arguments) # type: ignore - if arguments.get('tls_enabled', False) or arguments.get( + if arguments.get('tls_context') is not None or arguments.get( 'sasl_enabled', False ): if arguments.get('sasl_enabled', False) and ( diff --git a/oslo_cache/core.py b/oslo_cache/core.py index 2f60385a..dcacba8f 100644 --- a/oslo_cache/core.py +++ b/oslo_cache/core.py @@ -312,11 +312,6 @@ def _build_cache_config(conf: cfg.ConfigOpts) -> dict[str, Any]: tls_context.set_ciphers(conf.cache.tls_allowed_ciphers) conf_dict[f'{prefix}.arguments.tls_context'] = tls_context - - # pass the value of tls_enabled to the backend - conf_dict[f'{prefix}.arguments.tls_enabled'] = ( - conf.cache.tls_enabled - ) elif conf.cache.backend in ( 'dogpile.cache.redis', 'dogpile.cache.redis_sentinel',