Promote prefix_cache_retention_interval to an argument and change the default to 0 (#52216)

Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Tyler Michael Smith
2026-08-17 13:20:50 +00:00
committed by GitHub
co-authored by OpenAI Codex
parent 1d3a8b9e22
commit 017e9f4448
17 changed files with 160 additions and 63 deletions
+5
View File
@@ -18,6 +18,7 @@ def test_prefix_caching_from_cli():
assert vllm_config.cache_config.enable_prefix_caching, (
"V1 turns on prefix caching by default."
)
assert vllm_config.cache_config.prefix_cache_retention_interval == 0
# Turn it off possible with flag.
args = parser.parse_args(["--no-enable-prefix-caching"])
@@ -47,6 +48,10 @@ def test_prefix_caching_from_cli():
with pytest.raises(ArgumentError):
args = parser.parse_args(["--prefix-caching-hash-algo", "invalid"])
args = parser.parse_args(["--prefix-cache-retention-interval", "64"])
vllm_config = EngineArgs.from_cli_args(args=args).create_engine_config()
assert vllm_config.cache_config.prefix_cache_retention_interval == 64
@pytest.mark.skipif(_xxhash is None, reason="xxhash not installed")
def test_prefix_caching_xxhash_from_cli():