[RadixTree][4/N Refactor]: Move available_and_evictable_str to individual radix cache classes (#17852)

This commit is contained in:
pansicheng
2026-02-19 17:03:15 +08:00
committed by GitHub
parent 82a0bafc1c
commit 48642d5384
7 changed files with 50 additions and 37 deletions
@@ -12,6 +12,7 @@ from sglang.srt.mem_cache.base_prefix_cache import (
MatchPrefixParams,
)
from sglang.srt.mem_cache.cache_init_params import CacheInitParams
from sglang.srt.mem_cache.common import available_and_evictable_str
from sglang.srt.mem_cache.mamba_radix_cache import MambaRadixCache
from sglang.srt.mem_cache.memory_pool import HybridLinearKVPool, HybridReqToTokenPool
from sglang.srt.mem_cache.radix_cache import RadixKey
@@ -381,6 +382,10 @@ class TestMamba(unittest.TestCase):
== mamba_pool.mamba_cache.temporal[:, last_node.mamba_value]
)
print(tree.available_and_evictable_str())
print(available_and_evictable_str(tree))
tree.sanity_check()
if __name__ == "__main__":
unittest.main()