diff --git a/python/sglang/srt/mem_cache/radix_cache.py b/python/sglang/srt/mem_cache/radix_cache.py index 21fe3b2b9..847a7dbbf 100644 --- a/python/sglang/srt/mem_cache/radix_cache.py +++ b/python/sglang/srt/mem_cache/radix_cache.py @@ -495,7 +495,7 @@ class RadixCache(BasePrefixCache): # One BlockStored per ``page_size`` chunk. if self.enable_kv_cache_events: # First chunk links to the last page of the parent node (if any). - if node.parent is None: + if node.parent is None or node != self.root_node: parent_block_hash = None else: last_page_start = (