Skip to content

Commit

Permalink
fix: invalidate client cache on config change (#298)
Browse files Browse the repository at this point in the history
Co-authored-by: Pratik Mishra <[email protected]>
  • Loading branch information
pratikmishra356 and Pratik Mishra authored Dec 4, 2024
1 parent fe0171f commit 16f4477
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/cac_client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ impl Client {
let mut last_modified = self.last_modified.write().await;
let last_modified_at = get_last_modified(&fetched_config);
*config = fetched_config.json::<Config>().await.map_err_to_string()?;
self.config_cache.invalidate_all();
if let Some(val) = last_modified_at {
*last_modified = val;
}
Expand Down

0 comments on commit 16f4477

Please sign in to comment.