From 04f8094199157a85a07bbac27bc5c09aa2549e11 Mon Sep 17 00:00:00 2001 From: Yufu Zhao Date: Mon, 10 Feb 2025 12:03:58 +0800 Subject: [PATCH] fix(config): correct option name for kong_cache (#14173) `kong_config.resurrect_ttl` is a invalid value, actually it should be `kong_config.db_resurrect_ttl` --- changelog/unreleased/kong/fix-db_resurrect_ttl.yml | 3 +++ kong/global.lua | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/kong/fix-db_resurrect_ttl.yml diff --git a/changelog/unreleased/kong/fix-db_resurrect_ttl.yml b/changelog/unreleased/kong/fix-db_resurrect_ttl.yml new file mode 100644 index 00000000000..44715db1bb9 --- /dev/null +++ b/changelog/unreleased/kong/fix-db_resurrect_ttl.yml @@ -0,0 +1,3 @@ +message: "Fixed an issue where the `db_resurrect_ttl` configuration does not take effect." +type: bugfix +scope: Configuration diff --git a/kong/global.lua b/kong/global.lua index a67e612ff0c..8b6c479d86a 100644 --- a/kong/global.lua +++ b/kong/global.lua @@ -261,7 +261,7 @@ function _GLOBAL.init_cache(kong_config, cluster_events, worker_events) worker_events = worker_events, ttl = db_cache_ttl, neg_ttl = db_cache_neg_ttl or db_cache_ttl, - resurrect_ttl = kong_config.resurrect_ttl, + resurrect_ttl = kong_config.db_resurrect_ttl, page = page, cache_pages = cache_pages, resty_lock_opts = LOCK_OPTS, @@ -288,7 +288,7 @@ function _GLOBAL.init_core_cache(kong_config, cluster_events, worker_events) worker_events = worker_events, ttl = db_cache_ttl, neg_ttl = db_cache_neg_ttl or db_cache_ttl, - resurrect_ttl = kong_config.resurrect_ttl, + resurrect_ttl = kong_config.db_resurrect_ttl, page = page, cache_pages = cache_pages, resty_lock_opts = LOCK_OPTS,