v0.34.0_1

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-18 06:41:20 +02:00
1 parent 9cfc4588cc
commit f20c8da718
25 files changed
+694 -117

No files matched your search

+2 -7
View File
@@ -61,7 +61,6 @@ impl Cache {
store.lru.insert(sequence, storage_key);
// Preserve the exact LRU and domain-byte counters, without
// allocating a replacement variant index or String keys.
store.saved_body_hit(&ticket.scope, &ticket.domain, body_bytes);
self.counters.hits.fetch_add(1, Ordering::Relaxed);
drop(store);
@@ -77,6 +76,7 @@ impl Cache {
"age",
HeaderValue::from_str(&age.to_string()).expect("integer header"),
);
self.domain_stats.saved_body_hit(&ticket.scope, &ticket.domain, body_bytes);
return Some(Hit {
response,
body,
@@ -274,12 +274,7 @@ impl Cache {
"age",
HeaderValue::from_str(&age.to_string()).expect("integer header"),
);
{
let mut store = self.store.lock().unwrap_or_else(|e| e.into_inner());
if let Some(c) = store.domain(&ticket.scope, &ticket.domain) {
c.saved_body_bytes = c.saved_body_bytes.saturating_add(entry.body_bytes as u64);
}
}
self.domain_stats.saved_body_hit(&ticket.scope, &ticket.domain, entry.body_bytes);
self.counters.hits.fetch_add(1, Ordering::Relaxed);
self.counters.cold_hits.fetch_add(1, Ordering::Relaxed);
self.counters
+1 -3
View File
@@ -108,9 +108,7 @@ impl Cache {
return false;
}
if count_stored {
if let Some(c) = store.domain(&entry.scope, &entry.domain) {
c.stored += 1;
}
self.domain_stats.stored(&entry.scope, &entry.domain);
}
entry.last_access = Instant::now();
entry.sequence = store.next_sequence();