prefix_caching_active

Function prefix_caching_active 

Source
pub fn prefix_caching_active(
    enable_flag: bool,
    kv_only_prefix_cache_is_safe: bool,
) -> bool
Expand description

Whether the prefix cache this serve will actually install is a REAL cache.

SSOT mirror of spark-server’s build_prefix_cache: the flag alone is not enough, because a compressed DeepSeek-V4 config downgrades to NoPrefixCaching even with --enable-prefix-caching (the cache does not preserve the compressor pool/ring state required for exact reuse). The allocating call site asks the constructed cache directly (PrefixCache::is_active); preflight runs before it exists and must reproduce the same predicate from args + config.