Skip to content

feat(cache): add locked LRU pruning#15

Merged
jmgilman merged 1 commit intomasterfrom
session-007/cache-lru
May 5, 2026
Merged

feat(cache): add locked LRU pruning#15
jmgilman merged 1 commit intomasterfrom
session-007/cache-lru

Conversation

@jmgilman
Copy link
Copy Markdown
Contributor

@jmgilman jmgilman commented May 5, 2026

Summary

  • add XDG/Viper user cache configuration for cache.dir and cache.max-size
  • persist filesystem LRU metadata and expose explicit DiskStore.Prune(ctx) maintenance
  • serialize default cache-using builds with <cache root>/cache.lock and prune after successful builds before unlock

Validation

  • go test -count=1 ./...
  • git diff --check

@jmgilman jmgilman force-pushed the session-007/cache-lru branch from d214626 to 2d25b50 Compare May 5, 2026 15:35
Add XDG/Viper cache configuration for cache.dir and cache.max-size, persist filesystem LRU metadata, and serialize cache-using builds with a cache-root lock before pruning.

Default IncusOS builds now use the configured disk cache, prune after successful builds while holding the lock, and leave injected test catalogs isolated from the real cache.
@jmgilman jmgilman force-pushed the session-007/cache-lru branch from 2d25b50 to b37819c Compare May 5, 2026 15:41
@jmgilman jmgilman merged commit 5bbbe47 into master May 5, 2026
2 checks passed
@jmgilman jmgilman deleted the session-007/cache-lru branch May 5, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant