[Cache] Forward fast prefix matching capability (#37844)

This commit is contained in:
cctry
2026-09-03 10:33:30 -07:00
committed by GitHub
parent 54cadad151
commit 33a22b1b08
3 changed files with 11 additions and 1 deletions
@@ -369,6 +369,10 @@ class UnifiedTreeCoreInterface(ABC):
"""Match a key against the tree; returns device indices + boundary NodeIds."""
...
def supports_fast_match_prefix(self) -> bool:
"""Whether matching every waiting request is cheap enough for scheduling."""
return False
@property
@abstractmethod
def empty_match_result(self) -> MatchResult:
@@ -538,6 +538,9 @@ class UnifiedRadixCache(BasePrefixCache):
result = self.linker.match(params.key, params.req, result)
return result
def supports_fast_match_prefix(self) -> bool:
return self.tree_core.supports_fast_match_prefix()
def is_chunk_cache(self) -> bool:
return self.disable