Skip to content

Conversation

@florianbrinkmann
Copy link
Member

Fixes #242.

The PR checks for the new sitemap feature added in WP 5.5, thanks @ManuelHu for the query var checks in the issue and @chesio for the tip with get_query_var().

@stklcode
Copy link
Contributor

stklcode commented Jan 7, 2022

Serving the correct content types would be a more elegant solution to the actual problem. There’s no reason not to cache sitemaps or feeds in general.

This might be achieved via webserver config for static HDD cache, derived from the request URI. Well, possible, but not elegant.

But since Cachify has no logic for non-HTML content and the clearing mechanisms would have to be adjusted to properly invalidate the sitemap cache, exclusion seems reasonable at this point.

@stklcode stklcode added this to the 2.4.0 milestone Jan 7, 2022
@stklcode stklcode added the bug label Jan 7, 2022
@krafit krafit merged commit 2dd92ac into develop Jan 8, 2022
@krafit krafit deleted the exclude-sitemap-from-caching branch January 8, 2022 14:15
@Zodiac1978 Zodiac1978 mentioned this pull request Feb 20, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WordPress Core sitemaps are cached (and served with the wrong content type when using HDD caching)

4 participants