We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e77ebb commit 86c814dCopy full SHA for 86c814d
src/web/rustdoc.rs
@@ -284,7 +284,8 @@ impl RustdocPage {
284
285
let mut response = Response::with((Status::Ok, html));
286
response.headers.set(ContentType::html());
287
- if let Some(cache_control) = if is_latest_url {
+
288
+ let cache_control = if is_latest_url {
289
generate_cache_directives_for(
290
Some(config.cache_control_max_age_latest.unwrap_or(0)),
291
config.cache_control_stale_while_revalidate_latest,
@@ -294,7 +295,8 @@ impl RustdocPage {
294
295
config.cache_control_max_age,
296
config.cache_control_stale_while_revalidate,
297
)
- } {
298
+ };
299
+ if let Some(cache_control) = cache_control {
300
response.headers.set(cache_control);
301
}
302
Ok(response)
0 commit comments