feat : add radix prefix cache

- replace hash-only lookup with page-granular radix matching
- keep partial pages private and cache only materialized KV prefixes
- integrate completed-request caching and add radix behavior tests
This commit is contained in:
2026-08-06 11:45:52 +08:00
parent 654e6eb0d1
commit b2230fefd8
5 changed files with 142 additions and 34 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ from astrai.inference.core.cache import (
KVCache,
KVStorage,
PagePool,
PrefixCache,
RadixCache,
ReqToTokenPool,
page_hash,
)
@@ -18,7 +18,7 @@ __all__ = [
"KVCache",
"KVStorage",
"PagePool",
"PrefixCache",
"RadixCache",
"ReqToTokenPool",
"page_hash",
"Executor",