2

First of all, sorry if I'm making a mistake. I already asked this on the ServerFault forum, but got no answers at the moment and I thought it would be a good idea to ask the question here, considering that it is a WordPress specific question.

I have a WordPress site that runs fine, but there's a strange behaviour: one a reader loads the page, the site shows a "cached" version of the site, with the same news and comment numbers that the reader viewed when he visited the site last time.

So every user has to reload the page (Ctrl+F5, Cmd+R) in order to get the "real", and updated homepage.

I don't know why this is happening. At the moment I'm not using any cache plugin, and my server is running Nginx+MySQL+PHP-FPM on a Ubuntu 10.04 LTS Linux VPS. Is there something I must change on the nginx config files, maybe?

  • this sounds like you have high expires set for your actual html/homepage which means that user is caching your homepage, can you paste your nginx config – anthonysomerset Mar 7 '11 at 12:53
  • this should be migrated right back to serverfault - bizarre decision to move it – anu Mar 8 '11 at 9:47
  • How is configured (if any) php cache, like APC? – Marcin Mar 8 '11 at 12:11
0

Sounds like your expires headers are set to far in the future. The following rules can be added to your .htaccess Expires rules can be added to your Nginx server file to shorten the expires time down to 180 seconds.

location ~* \/[^\/]+\/(feed|\.xml|.html|.HTML)\/? {

               expires 180;
}

I would also suggest installing the Nginx Proxy Cache Integrator plugin to control the Nginx static file proxy cache.

Another plugin that is similar is Nginx Proxy Cache Purge that purges the proxy cache anytime you update your site.

The problem your having is NOT being caused by WordPress.

1

I had an issue like this and it was the WP Super Cache plugin. Try disabling it and if that works, check around the settings to see what's amiss.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.