0

I am running a Wordpress site on a Ubuntu server. I installed APC and setup Cloudflare. After that I started having a strange problem with the feed.

When I check the feed on the browser, I can see the latest posts. However, when I wget it, it's outdated. Google Reader and Feedburner see the outdated feed too. I excluded www.mysite.com/feed from caching in the Cloudflare settings, but it did not help. I'm really confused what's happening.

  • Does Wordpress serve a different page when visited with/out browser?
  • Are any special settings required for APC to keep the feeds updated?
HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
mustafa
  • 111
  • 5

2 Answers2

0

Are you using W3 Total Cache or something similar? If so, that's by design, at least until the cache expires. Logged in users get fresh data, everyone else gets the rendered content that was written to disk, sent to APC, etc.

Jason Litka
  • 148
  • 1
  • 3
  • I installed W3 Total Cache, then deactivated it. But I still see its files around, I'm not sure if it was really deactivated. – mustafa Mar 28 '13 at 06:23
  • yes, you are right. I just noticed that I get different content when I am logged in. W3TC is still in power. Thus, I reactivated W3TC and disabled feed caching. I hope it will work – mustafa Mar 28 '13 at 08:11
0

If you restart HTTP, does the feed refresh? If so, then this is APC (or other plugin) caching the results of the RSS feed generator. You can exclude certain files from apc using APC filters.

https://stackoverflow.com/questions/13456475/how-to-exclude-php-file-from-apc-cache

If the issue does not resolve, try pulling the feed directly (not through cloudflare) to assure cloudflare is not the issue.

If you are using W3TC

Use curl -I to check the headers on the URL to assure caching is set properly.

As the other posted mentioned, things like W3TC will cache RSS feeds if not configured correctly. You must set proper page cache settings in W3TC so that the CDN will re-validate the file when updated.

You will want to either exclude your feed from W3TC's caching and/or update the Page cache headers.

jeffatrackaid
  • 4,142
  • 19
  • 22
  • It returns a cookie which will expire on 23-Dec-2019. I had created a Cloudflare page rule to bypass this URL. Is this cookie set by Cloudflare or W3TC? – mustafa Mar 28 '13 at 07:39
  • HTTP/1.1 200 OK Server: cloudflare-nginx Date: Thu, 28 Mar 2013 08:44:07 GMT Content-Type: text/html Connection: keep-alive Vary: Accept-Encoding Set-Cookie: __cfduid=d3b6c3986d3a04cd12d97dcf7568634091364460246; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; – mustafa Mar 28 '13 at 08:45