MCPcopy Create free account
hub / github.com/TheSecuredAnalyst/security-suite / get_cache

Function get_cache

core/cache.py:285–299  ·  view source on GitHub ↗

Get or create global cache instance. Args: ttl_seconds: Time-to-live for cache entries Returns: ScanCache instance

(ttl_seconds: int = ScanCache.DEFAULT_TTL)

Source from the content-addressed store, hash-verified

283# Global cache instance
284_cache_instance: ScanCache | None = None
285
286
287def get_cache(ttl_seconds: int = ScanCache.DEFAULT_TTL) -> ScanCache:
288 """Get or create global cache instance.
289
290 Args:
291 ttl_seconds: Time-to-live for cache entries
292
293 Returns:
294 ScanCache instance
295 """
296 global _cache_instance
297
298 if _cache_instance is None:
299 _cache_instance = ScanCache(ttl_seconds)
300
301 return _cache_instance

Callers

nothing calls this directly

Calls 1

ScanCacheClass · 0.85

Tested by

no test coverage detected