Oh hai!
I was wondering why the suggested nginx configuration prevents URLs containing “/feed/” from being cached. According to my access logs and a quick look at the code, these URLs are in fact purged, and while someone in this thread suggested removing the purging code, I would much rather do the opposite and allow feeds to be cached. Just the explicit exclusion in the sample config leads me to think that I may be overlooking a crucial problem with that approach.
# Don't cache uris containing the following segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $no_cache 1;
}
We have many readers who request our feeds frequently, so that almost 30% of the requests handled my Wordpress (cache notwithstanding) are requests for various feeds. The comment feeds of older posts hardly ever change anymore, and with just a few posts and updates per day, the main feeds would greatly benefit from caching as well.
Are there any hidden hazards in just removing the “|/feed/” part from the regular expression?
Many thanks in advance,
Telofy