(
self,
cache_dir: Optional[Path] = None,
max_l1_entries: int = MAX_L1_ENTRIES,
)
| 252 | """ |
| 253 | |
| 254 | def __init__( |
| 255 | self, |
| 256 | cache_dir: Optional[Path] = None, |
| 257 | max_l1_entries: int = MAX_L1_ENTRIES, |
| 258 | ) -> None: |
| 259 | self._l1: OrderedDict[str, FileCacheEntry] = OrderedDict() |
| 260 | self._max_l1 = max_l1_entries |
| 261 | self._cache_dir: Optional[Path] = None |
| 262 | if cache_dir: |
| 263 | try: |
| 264 | cache_dir.mkdir(parents=True, exist_ok=True) |
| 265 | self._cache_dir = cache_dir |
| 266 | except OSError as e: |
| 267 | warnings.warn( |
| 268 | f"PySpector: cannot create cache directory {cache_dir!r}: {e}. " |
| 269 | "Disk cache disabled for this run.", |
| 270 | stacklevel=2, |
| 271 | ) |
| 272 | |
| 273 | # ── Public API ─────────────────────────────────────────────────────────── |
| 274 |
nothing calls this directly
no outgoing calls
no test coverage detected