From ed0b7731c0124ea3404fa576ce5904d03868ce5a Mon Sep 17 00:00:00 2001 From: Michael Calmer Date: Fri, 10 Jan 2025 11:21:36 +0100 Subject: [PATCH] Set maximal cache time for metadata to 5 minutes --- ....changes.mcalmer.api-for-pillar-refresh-all-systems | 1 + containers/proxy-squid-image/squid.conf | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 containers/proxy-squid-image/proxy-squid-image.changes.mcalmer.api-for-pillar-refresh-all-systems diff --git a/containers/proxy-squid-image/proxy-squid-image.changes.mcalmer.api-for-pillar-refresh-all-systems b/containers/proxy-squid-image/proxy-squid-image.changes.mcalmer.api-for-pillar-refresh-all-systems new file mode 100644 index 000000000000..05371f333730 --- /dev/null +++ b/containers/proxy-squid-image/proxy-squid-image.changes.mcalmer.api-for-pillar-refresh-all-systems @@ -0,0 +1 @@ +- Set maximal cache time for metadata to 5 minutes diff --git a/containers/proxy-squid-image/squid.conf b/containers/proxy-squid-image/squid.conf index 603bc7e2792c..1e23ae17daff 100644 --- a/containers/proxy-squid-image/squid.conf +++ b/containers/proxy-squid-image/squid.conf @@ -25,13 +25,13 @@ cache_replacement_policy heap LFUDA memory_replacement_policy heap GDSF # cache repodata only few minutes and then query parent whether it is fresh -refresh_pattern /XMLRPC/GET-REQ/.*/repodata/.*$ 0 1% 1440 reload-into-ims refresh-ims -refresh_pattern /ks/.*/repodata/.*$ 0 1% 1440 reload-into-ims refresh-ims +refresh_pattern /XMLRPC/GET-REQ/.*/repodata/.*$ 0 1% 5 reload-into-ims refresh-ims +refresh_pattern /ks/.*/repodata/.*$ 0 1% 5 reload-into-ims refresh-ims # salt minions get the repodata via a different URL -refresh_pattern /rhn/manager/download/.*/repodata/.*$ 0 1% 1440 reload-into-ims refresh-ims +refresh_pattern /rhn/manager/download/.*/repodata/.*$ 0 1% 5 reload-into-ims refresh-ims # bootstrap repos needs to be handled as well -refresh_pattern /pub/repositories/.*/repodata/.*$ 0 1% 1440 reload-into-ims refresh-ims -refresh_pattern /pub/repositories/.*/venv-enabled-.*.txt$ 0 1% 1440 reload-into-ims refresh-ims +refresh_pattern /pub/repositories/.*/repodata/.*$ 0 1% 5 reload-into-ims refresh-ims +refresh_pattern /pub/repositories/.*/venv-enabled-.*.txt$ 0 1% 5 reload-into-ims refresh-ims # rpm will hardly ever change, force to cache it for very long time refresh_pattern \.rpm$ 10080 100% 525600 override-expire override-lastmod ignore-reload reload-into-ims refresh_pattern \.deb$ 10080 100% 525600 override-expire override-lastmod ignore-reload reload-into-ims