"""detection_pkg._common - 共享:分析器检测缓存初始化。""" from __future__ import annotations from typing import Any def _ensure_detection_cache(analyser: Any) -> None: """Ensure analyser has a simple detection cache structure.""" if not hasattr(analyser, "_detection_cache"): analyser._detection_cache = {} if not hasattr(analyser, "_detection_cache_ttl"): analyser._detection_cache_ttl = 2.0