From 261c3996805bcdfb7ff271290f3e3557dd15cea7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 21 Feb 2026 16:59:31 +0900 Subject: feat(cache): add filesystem-backed cache with TTL expiration and size-limited GC Implement a cache module with CacheConfig and Cache structs supporting read/write (string and binary), atomic writes via temp+rename, TTL-based expiration, and size-limited garbage collection. Wire the repo cache into packagist.rs and resolver.rs for API response caching, and the files cache into downloader.rs for dist archive caching. Implement the clear-cache command with full clear and --gc modes. All existing call sites pass None for backward compatibility. Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/outdated.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/mozart/src/commands/outdated.rs') diff --git a/crates/mozart/src/commands/outdated.rs b/crates/mozart/src/commands/outdated.rs index f517871..f355e09 100644 --- a/crates/mozart/src/commands/outdated.rs +++ b/crates/mozart/src/commands/outdated.rs @@ -332,7 +332,7 @@ fn fetch_latest_version(name: &str) -> anyhow::Result { use crate::package::Stability; use crate::version::find_best_candidate; - let versions = crate::packagist::fetch_package_versions(name)?; + let versions = crate::packagist::fetch_package_versions(name, None)?; let best = find_best_candidate(&versions, Stability::Stable) .ok_or_else(|| anyhow::anyhow!("No stable version found for {name}"))?; -- cgit v1.3.1