@@ -48,7 +48,7 @@ impl CachePolicy {
4848 CachePolicy :: NoStoreMustRevalidate => Some ( NO_STORE_MUST_REVALIDATE . clone ( ) ) ,
4949 CachePolicy :: ForeverInCdnAndBrowser => Some ( FOREVER_IN_CDN_AND_BROWSER . clone ( ) ) ,
5050 CachePolicy :: ForeverInCdn => {
51- if config. full_page_cache {
51+ if config. cache_invalidatable_responses {
5252 // A missing `max-age` or `s-maxage` in the Cache-Control header will lead to
5353 // CloudFront using the default TTL, while the browser not seeing any caching header.
5454 // This means we can have the CDN caching the documentation while just
@@ -60,7 +60,7 @@ impl CachePolicy {
6060 }
6161 }
6262 CachePolicy :: ForeverInCdnAndStaleInBrowser => {
63- if config. full_page_cache {
63+ if config. cache_invalidatable_responses {
6464 config
6565 . cache_control_stale_while_revalidate
6666 . map ( |seconds| format ! ( "stale-while-revalidate={seconds}" ) . parse ( ) . unwrap ( ) )
@@ -161,7 +161,7 @@ mod tests {
161161 fn render_forever_in_cdn_disabled ( ) {
162162 wrapper ( |env| {
163163 env. override_config ( |config| {
164- config. full_page_cache = false ;
164+ config. cache_invalidatable_responses = false ;
165165 } ) ;
166166
167167 assert_eq ! (
@@ -176,7 +176,7 @@ mod tests {
176176 fn render_forever_in_cdn_or_stale_disabled ( ) {
177177 wrapper ( |env| {
178178 env. override_config ( |config| {
179- config. full_page_cache = false ;
179+ config. cache_invalidatable_responses = false ;
180180 } ) ;
181181
182182 assert_eq ! (
0 commit comments