File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 if (is_user_logged_in ()) {
1919 $ headers ['Cache-Control ' ] = 'must-revalidate, max-age=0, private ' ;
2020
21- // cache 404 pages for 1 hour (shared), 5 minutes (browser)
21+ // cache 404 pages for 1 hour (shared) or 5 minutes (browser)
2222 } elseif (is_404 ()) {
2323 $ headers ['Cache-Control ' ] = 'public, s-max-age=3600, max-age=300 ' ;
2424
25- // cache feeds and XML files (ie sitemap) for 1 day (both shared and browser)
25+ // cache feeds and XML files (ie sitemap) for 1 day (shared) or 1 hour ( browser)
2626 } elseif (is_feed () || str_ends_with ($ _SERVER ['REQUEST_URI ' ] ?? '' , '.xml ' )) {
27- $ headers ['Cache-Control ' ] = 'public, max-age=86400 ' ;
28- // cache all other pages for 30 days (shared) or 1 day (browser cache)
27+ $ headers ['Cache-Control ' ] = 'public, s-max-age=86400, max-age=3600 ' ;
28+
29+ // cache all other pages for 30 days (shared) or 1 hour (browser)
2930 } else {
30- $ headers ['Cache-Control ' ] = 'public, s-max-age=2592000, max-age=86400 ' ;
31+ $ headers ['Cache-Control ' ] = 'public, s-max-age=2592000, max-age=3600 ' ;
3132 }
3233
3334 return $ headers ;
You can’t perform that action at this time.
0 commit comments