We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f652b3e commit d5a9d02Copy full SHA for d5a9d02
1 file changed
includes/set-cache-headers.php
@@ -19,7 +19,10 @@
19
} elseif (is_404()) {
20
$headers['Cache-Control'] = 'public, max-age=3600';
21
22
- // cache all other pages for 30 days
+ // cache feeds and XML files (ie sitemap) for 1 day
23
+ } elseif (is_feed() || str_ends_with($_SERVER['REQUEST_URI'] ?? '', '.xml')) {
24
+ $headers['Cache-Control'] = 'public, max-age=81600';
25
+ // cache all other pages for 1 year
26
} else {
27
$headers['Cache-Control'] = 'public, max-age=2592000';
28
}
0 commit comments