Initialize cache manager with directory structure.
(self, cache_dir: Path)
| 366 | """Enhanced cache manager for PlatformIO artifacts.""" |
| 367 | |
| 368 | def __init__(self, cache_dir: Path): |
| 369 | """Initialize cache manager with directory structure.""" |
| 370 | self.cache_dir = cache_dir |
| 371 | # Simplified structure: each artifact gets its own directory directly in cache root |
| 372 | # containing both the .zip and extracted/ folder |
| 373 | |
| 374 | # Create directory structure |
| 375 | self.cache_dir.mkdir(parents=True, exist_ok=True) |
| 376 | |
| 377 | # Proactively clean up stale PlatformIO locks before starting builds |
| 378 | # This prevents hangs from previous crashed builds |
| 379 | cleanup_stale_platformio_locks(max_age_minutes=30) |
| 380 | |
| 381 | def _get_cache_key(self, url: str) -> str: |
| 382 | """Generate cache key from URL - sanitized for filesystem use.""" |
nothing calls this directly
no test coverage detected