Skip to content

Commit

Permalink
ensure caching can be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
stormshield-frb committed Sep 6, 2024
1 parent bad6c29 commit 187f010
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions protocols/identify/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ impl Config {
///
/// If set to [`None`], caching is disabled.
pub fn with_cache_config(mut self, cache_config: Option<PeerAddressesConfig>) -> Self {
#[allow(deprecated)]
{
// set cache_size to 0 to ensure if user call `with_cache_config(None)`, caching do get disabled.
self.cache_size = 0;
}
self.cache_config = cache_config;
self
}
Expand Down

0 comments on commit 187f010

Please sign in to comment.