From 26c8a310bd0387ed3100608102d99ab331e90657 Mon Sep 17 00:00:00 2001 From: huangtingwei <141888744+huangtingwei9988@users.noreply.github.com> Date: Thu, 31 Jul 2025 14:02:42 +0800 Subject: [PATCH] fix incorrect increase of hit count (#8533) Co-authored-by: Zhiqiang Xie --- python/sglang/srt/mem_cache/hiradix_cache.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/python/sglang/srt/mem_cache/hiradix_cache.py b/python/sglang/srt/mem_cache/hiradix_cache.py index d21077eca..ef61101d7 100644 --- a/python/sglang/srt/mem_cache/hiradix_cache.py +++ b/python/sglang/srt/mem_cache/hiradix_cache.py @@ -560,13 +560,11 @@ class HiRadixCache(RadixCache): prefix_len = self.key_match_fn(child.key, key) if prefix_len < len(child.key): new_node = self._split_node(child.key, child, prefix_len) - self.inc_hit_count(new_node) if not new_node.evicted: value.append(new_node.value) node = new_node break else: - self.inc_hit_count(child) if not child.evicted: value.append(child.value) node = child