From 95654c61fd763cdcb889def386cfd84bbf0290ef Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 6 Apr 2025 09:55:02 -0700 Subject: [PATCH] shaping.lua: increase shaping_data cache capacity I've observed a system where we had more than 4 outstanding shaping_data lookups from different ConfigEpochs; that system had slow dns resolution and we ended up looping for these because the capacity was not high enough and the population of the result always took too long. Let's just give ourselves a bit more headroom; this coupled with the earlier commits that adjust retry behavior should help to smooth things out in this situation. --- assets/policy-extras/shaping.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/policy-extras/shaping.lua b/assets/policy-extras/shaping.lua index 499a1994..a4f39caa 100644 --- a/assets/policy-extras/shaping.lua +++ b/assets/policy-extras/shaping.lua @@ -413,7 +413,7 @@ function mod:setup_with_automation(options) local cached_load_data = kumo.memoize(load_shaping_data, { name = 'shaping_data', ttl = options.cache_ttl or '1 minute', - capacity = 4, + capacity = 16, invalidate_with_epoch = true, retry_on_populate_timeout = options.retry_shaping_data_fetch_on_populate_timeout, populate_timeout = options.shaping_data_populate_timeout,