v0.34.7
This commit is contained in:
1 parent
133d2f0f91
commit
3ea00045bf
27 files changed
+446
-136
No files matched your search
@@ -178,7 +178,8 @@ let original_policy = cache_plan.request_policy(
|
||||
);
|
||||
|
||||
let only_cached =
|
||||
cache_settings.active_for(route.cache) && crate::cache::only_if_cached(request.headers());
|
||||
cache_settings.active_for(route.cache) && !cache_settings.varnish_compatible
|
||||
&& crate::cache::only_if_cached(request.headers());
|
||||
let origin_suffix = match route.rewritten_path(&path) {
|
||||
Ok(None) => public_suffix.clone(),
|
||||
Ok(Some(rewritten)) => {
|
||||
@@ -296,7 +297,7 @@ let cache_ticket = if effective_cacheable {
|
||||
cache_route,
|
||||
&public_suffix,
|
||||
key_headers,
|
||||
)
|
||||
).map(|ticket| ticket.with_varnish_compatible(cache_settings.varnish_compatible))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
@@ -308,14 +309,17 @@ let cached_revalidation = if let Some(ticket) = cache_ticket.as_ref() {
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let freshness_headers = crate::cache::request_freshness_headers(
|
||||
&client_conditionals, cache_settings,
|
||||
);
|
||||
let freshness_revalidation_reason = cached_revalidation
|
||||
.as_ref()
|
||||
.and_then(|cached| cached.request_freshness_revalidation_reason(&client_conditionals));
|
||||
.and_then(|cached| cached.request_freshness_revalidation_reason(&freshness_headers));
|
||||
let pending_revalidation = revalidation_reason.is_some()
|
||||
|| freshness_revalidation_reason.is_some()
|
||||
|| cached_revalidation
|
||||
.as_ref()
|
||||
.is_some_and(|cached| !cached.reusable_for_request(&client_conditionals));
|
||||
.is_some_and(|cached| !cached.reusable_for_request(&freshness_headers));
|
||||
let miss_recorded = false;
|
||||
(
|
||||
backend, backend_lease, affinity_cookie, admin_control_plane, cache_settings,
|
||||
|
||||
Reference in new issue
Block a user