RSS feeds and Caching


#1

I noticed since adjusting CF to cache everything that my wordpress feeds (RSS) are not updating unless I manually clear cache through CF.

I’ve set for a browser expiry of 4 hours via a pagerule.

However, it doesn’t seem to work with feeds. I guess this is partially due to any host requesting them may not be too frequent. That said my server stats used to say I get hammered a lot for feed requests … hmmm

Anyway, is there a pagerule for feeds aside from bypass? Can I set it to clear the cache of a feed every 4 days or the like?

Any other ideas accepted too :slight_smile:


#2

You need to set the Edge Cache. That’s what is holding the Cache Everything content.


#3

Edge Cache TTL is set for four hours. However did not seem to work as the the RSS feed was updated 18 hours ago yet still held an older version in cache.


#4

It appears you may be using feedburner for your RSS feed, depending on which of your domains this is related to, are you sure it’s a Cloudflare issue?


#5

This site has two feeds, one native which does indeed hit Feedburner. But the main native blog feed also goes directly from WordPress to my personal feed reader and is being used with mailchimp.

I checked the url of the feed site.com/blog/feed and it was showing the old feed until I cleared the cache feed itself through Cloudflare.

The issue also only started since I started “Cache Everything”. So that, along with the above makes me pretty certain it’s coming CloudFlare.

Does a feed (or page) need to be (re) loaded for the Edge cache rule on clearing it to begin? ( If this is the case then since switching to HTTPS the native feed may not be getting pinged by bots etc so may not be refreshed that often).


#6

If you run curl -I https://www.site.com/blog/feed/ you’ll get the Cloudflare headers back and one of them will be the expires header…

expires: Mon, 18 Sep 2017 17:26:19 GMT

This is the one I got from the Cloudflare POP I connected through… each POP maintains its own cache and timing on any given object we vary based on when that POP first accessed it. There shouldn’t be anything special about an RSS feed in terms of expiring content from the cache; it should age out based on whatever expires header is set on the object at that pop and if a more updated version is available when the cache expires it should display it.


#7

Thanks for that information.

I don’t have another post/feed coming out for a week to test this issue. But I’ll time the next one so I can watch the headers and see what’s happening. I’ll post back here with the findings.