Add CachePolicyFactory for pluggable/external eviction policies (#49114)

Signed-off-by: Philip Pesic <philippesic06@gmail.com>
This commit is contained in:
Philip Pesic
2026-07-29 07:34:55 +03:00
committed by GitHub
parent 0bb548b60e
commit dc1be79031
15 changed files with 269 additions and 33 deletions
+2
View File
@@ -37,6 +37,7 @@ _EMPTY_REQ_CTX = make_req_context()
def make_cpu_manager(
num_blocks: int = 4,
cache_policy: str = "lru",
cache_policy_module_path: str | None = None,
enable_events: bool = False,
store_threshold: int = 0,
max_tracker_size: int = 64_000,
@@ -44,6 +45,7 @@ def make_cpu_manager(
return CPUOffloadingManager(
num_blocks=num_blocks,
cache_policy=cache_policy,
cache_policy_module_path=cache_policy_module_path,
enable_events=enable_events,
store_threshold=store_threshold,
max_tracker_size=max_tracker_size,