[Cache] Forward fast prefix matching capability (#37844)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user