diff --git a/crates/puffin-cache/src/lib.rs b/crates/puffin-cache/src/lib.rs index 195d50f68..071b39ed8 100644 --- a/crates/puffin-cache/src/lib.rs +++ b/crates/puffin-cache/src/lib.rs @@ -246,7 +246,7 @@ impl Cache { /// Remove a package from the cache. /// /// Returns the number of entries removed from the cache. - pub fn purge(&self, name: &PackageName) -> Result { + pub fn clean(&self, name: &PackageName) -> Result { let mut count = 0; for bucket in [ CacheBucket::Wheels, @@ -255,7 +255,7 @@ impl Cache { CacheBucket::Interpreter, CacheBucket::Simple, ] { - count += bucket.purge(self, name)?; + count += bucket.clean(self, name)?; } Ok(count) } @@ -508,10 +508,10 @@ impl CacheBucket { } } - /// Purge a package from the cache bucket. + /// Remove a package from the cache bucket. /// /// Returns the number of entries removed from the cache. - fn purge(self, cache: &Cache, name: &PackageName) -> Result { + fn clean(self, cache: &Cache, name: &PackageName) -> Result { fn remove(path: impl AsRef) -> Result { Ok(if force_remove_all(path.as_ref())? { debug!("Removed cache entry: {}", path.as_ref().display()); diff --git a/crates/puffin/src/commands/clean.rs b/crates/puffin/src/commands/clean.rs index 4c7437a9f..907bb59ed 100644 --- a/crates/puffin/src/commands/clean.rs +++ b/crates/puffin/src/commands/clean.rs @@ -40,7 +40,7 @@ pub(crate) fn clean( })?; } else { for package in packages { - let count = cache.purge(package)?; + let count = cache.clean(package)?; match count { 0 => writeln!(printer, "No entries found for package: {}", package.cyan())?, 1 => writeln!(printer, "Cleared 1 entry for package: {}", package.cyan())?,