Commit 44daa62
feat(cache): add unified CacheManager subsystem
Introduce a centralized CacheManager that coordinates all cache
operations behind a layered lookup strategy with local and remote
PEP 503 backends, hierarchical collection routing, short-circuit
optimization in the bootstrapper, and dedicated CLI commands.
Key components:
- WheelCacheKey for content-addressed artifact identity
- CacheBackend protocol with LocalDirectoryBackend and RemotePEP503Backend
- CacheCollection for named groups of backends searched in priority order
- StoreRouter for variant-aware package routing
- CacheManager orchestrating hierarchical lookup with fallback
- CLI commands: cache list, stats, verify, invalidate, gc
Security:
- SHA256 streaming verification for remote downloads
- Filename sanitization against path traversal
- Atomic file operations (tempfile + rename)
- Symlink protection in scan/gc
- HTTP without SHA256 rejected unless --cache-allow-insecure
Co-Authored-By: Claude <claude@anthropic.com>
Signed-off-by: Sean Pryor <spryor@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Sean Pryor <spryor@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 2e7c9cd commit 44daa62
11 files changed
Lines changed: 3251 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
328 | 355 | | |
329 | 356 | | |
330 | 357 | | |
331 | 358 | | |
332 | 359 | | |
333 | 360 | | |
334 | | - | |
| 361 | + | |
335 | 362 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
340 | 366 | | |
341 | 367 | | |
342 | 368 | | |
343 | 369 | | |
344 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
345 | 374 | | |
346 | 375 | | |
347 | 376 | | |
| |||
1753 | 1782 | | |
1754 | 1783 | | |
1755 | 1784 | | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
1756 | 1812 | | |
1757 | 1813 | | |
1758 | 1814 | | |
| |||
1990 | 2046 | | |
1991 | 2047 | | |
1992 | 2048 | | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
1993 | 2063 | | |
1994 | 2064 | | |
1995 | 2065 | | |
| |||
0 commit comments