Updating Wordpress content and NGINX caching ..

June 4, 2016 1.1k views
Caching Nginx LEMP


This might be a 'simple' question, but can't seem to find the right answer to it. I understand that NGINX (FastCGI caching) can cache certain pages, including for example Wordpress pages. This is done to be able to serve them quickly (as static).

I also know that there are certain directives for the caching, such as expiration, inactivity, etc.

My question however is this : let's say that the cache is deleted after 1 day inactivity (no requests), but I update a Wordpress blog post in somewhere during that day. Now I have updated the content. But what about the cached content ? Is that cached content immediately replaced (and thus recached) by the updated content ? Or will the website visitors potentially have to wait untill the new content is rechaged (based on certain directives probably) ?


1 Answer

Addition to the post above :

My logic tells me, that just using a Wordpress caching plugin and purging the cache / rebuilding the cache (there is usually a button for that in the plugin screen) will solve the problem. That way wordpress can generate static files from dynamic pages and NGINX can serve those static files ... Any opinions on this solution ?

Have another answer? Share your knowledge.