Skip to content

Commit

Permalink
fix(gateway): clear subdir cache based on base_url (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra authored Sep 5, 2024
1 parent 6fa7c18 commit bc3bdf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/rattler_repodata_gateway/src/gateway/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ impl Gateway {
///
/// This method does not clear any on-disk cache.
pub fn clear_repodata_cache(&self, channel: &Channel, subdirs: SubdirSelection) {
self.inner
.subdirs
.retain(|key, _| key.0 != *channel || !subdirs.contains(key.1.as_str()));
self.inner.subdirs.retain(|key, _| {
key.0.base_url() != channel.base_url() || !subdirs.contains(key.1.as_str())
});
}
}

Expand Down

0 comments on commit bc3bdf1

Please sign in to comment.