[model-gateway] Improve logging across core modules (#15497)
This commit is contained in:
+1
-2
@@ -59,8 +59,7 @@ impl L0Cache {
|
||||
// Simple eviction: if we're at capacity, remove a random entry
|
||||
// DashMap doesn't support LRU directly, so we use a simple strategy
|
||||
if self.map.len() >= self.max_entries {
|
||||
// Get the key to remove in a separate scope to ensure iterator is dropped
|
||||
let key_to_remove = { self.map.iter().next().map(|entry| entry.key().clone()) }; // Iterator fully dropped here, all locks released
|
||||
let key_to_remove = { self.map.iter().next().map(|entry| entry.key().clone()) };
|
||||
|
||||
// Now remove it
|
||||
if let Some(k) = key_to_remove {
|
||||
|
||||
Reference in New Issue
Block a user