0.34.6_repo_cleanup

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-22 09:31:15 +02:00
1 parent ce1a90397c
commit 133d2f0f91
273 files changed
+5969 -6926

No files matched your search

-8
View File
@@ -1,7 +1,4 @@
{
// A backend 304 validates the stored representation. Merge the new
// metadata into the cached object and answer the client's original
// condition locally, just like Varnish's conditional delivery path.
if response.status() == StatusCode::NOT_MODIFIED && revalidation_sent {
if let (Some(ticket), Some(cached)) =
(cache_ticket.as_ref(), cached_revalidation.as_ref())
@@ -39,9 +36,6 @@ if response.status() == StatusCode::NOT_MODIFIED && revalidation_sent {
cache_settings.annotate_resident_age(response.headers_mut(), resident_age);
Some(response)
} else if state.cache.ticket_current(ticket) {
// The validation succeeded but the refreshed representation is no
// longer eligible for shared storage (for example new no-store).
// Serve it once, then discard the stored copy.
state.cache.discard(ticket);
let mut response = if !client_not_modified {
if let crate::cache::RangeSelection::Single(range) = range_selection {
@@ -91,8 +85,6 @@ if response.status() == StatusCode::NOT_MODIFIED && revalidation_sent {
}
}
}
// Both origin and transformed policies must be cacheable; hiding a
// Set-Cookie/private header never authorizes storage of private content.
let transformed_plan =
if origin_plan.is_none()
|| (ignore_static_cookie && crate::cache::varies_on(response.headers(), "cookie")) {