v0.36.10
This commit is contained in:
1 parent
2789991452
commit
e260612ef9
60 files changed
+69
-339
No files matched your search
Vendored
-4
@@ -119,7 +119,6 @@ impl Cache {
|
||||
}
|
||||
}
|
||||
|
||||
/// Marks a key as uncacheable so requests skip coalescing.
|
||||
pub fn remember_uncacheable(&self, ticket: &Ticket) {
|
||||
let now = std::time::Instant::now();
|
||||
let mut memo = self
|
||||
@@ -129,9 +128,6 @@ impl Cache {
|
||||
if memo.len() >= UNCACHEABLE_MEMO_CAPACITY && !memo.contains_key(&ticket.key) {
|
||||
memo.retain(|_, until| *until > now);
|
||||
if memo.len() >= UNCACHEABLE_MEMO_CAPACITY {
|
||||
// Keep hit-for-miss working for new keys under sustained churn:
|
||||
// drop the marker closest to expiry instead of silently
|
||||
// re-enabling request collapsing for this (uncacheable) key.
|
||||
if let Some(oldest) = memo
|
||||
.iter()
|
||||
.min_by_key(|(_, until)| **until)
|
||||
|
||||
Reference in new issue
Block a user