From 4e5b88496ceead5017a696e52179e9292bf104e7 Mon Sep 17 00:00:00 2001 From: Razvan Dimescu Date: Mon, 30 Mar 2026 00:17:40 +0300 Subject: [PATCH] fix: include recursive and coalesced queries in cache hit rate denominator (#24) The cache hit rate was computed as cached/(cached+forwarded+local+overridden), excluding recursive and coalesced queries from the denominator. This inflated the displayed rate (e.g. 57.9%) far above the actual cache proportion (20.9%). Co-authored-by: Claude Opus 4.6 --- site/dashboard.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/dashboard.html b/site/dashboard.html index e90fbea..9f86ffe 100644 --- a/site/dashboard.html +++ b/site/dashboard.html @@ -945,7 +945,7 @@ async function refresh() { prevTime = now; // Cache hit rate - const answered = q.cached + q.forwarded + q.local + q.overridden; + const answered = q.cached + q.forwarded + q.recursive + q.coalesced + q.local + q.overridden; const hitRate = answered > 0 ? ((q.cached / answered) * 100).toFixed(1) : '0.0'; document.getElementById('cacheRate').textContent = hitRate + '%';