From c57d1cd959e9da0b1c891939ab6fb3fd2e7a93d4 Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 14 Jul 2026 22:58:59 +0900 Subject: [PATCH] ops: Only warm cache testnet URLs 10% of the time --- production/nginx-cache-warmer | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/production/nginx-cache-warmer b/production/nginx-cache-warmer index 3cb803fbb..c919e38b9 100755 --- a/production/nginx-cache-warmer +++ b/production/nginx-cache-warmer @@ -172,16 +172,22 @@ do for url in $warmMiningURLs do warm "http://${hostnameBitcoin}${url}" - warm "http://${hostnameBitcoin}/testnet${url}" - warm "http://${hostnameBitcoin}/testnet4${url}" - warm "http://${hostnameBitcoin}/signet${url}" + # only warm cache for testnet URLs 10% of the time + if (( RANDOM % 100 < 10 )); then + warm "http://${hostnameBitcoin}/testnet${url}" + warm "http://${hostnameBitcoin}/testnet4${url}" + warm "http://${hostnameBitcoin}/signet${url}" + fi done for url in $warmLightningURLs do warm "http://${hostnameBitcoin}${url}" - warm "http://${hostnameBitcoin}/testnet${url}" - warm "http://${hostnameBitcoin}/signet${url}" + # only warm cache for testnet URLs 10% of the time + if (( RANDOM % 100 < 10 )); then + warm "http://${hostnameBitcoin}/testnet${url}" + warm "http://${hostnameBitcoin}/signet${url}" + fi done for url in $warmLiquidURLs