Let's say we have a wordpress site example.com
On our site, there are multiple products. Urls look like this:
example.com/products/product-1/
example.com/products/product-2/
example.com/products/product-3/
etc...
For the sake of example, let's assume following:
- Each product page takes 10 seconds to generate. There is no way to improve hardware or software performance so generating a product page will always take 10 seconds minimum.
- Information on product pages changes once every hour. Let's assume that each product page content changes once an hour and remains same until the next hour comes.
- We don't want to trigger cache regeneration by an end user. In other words, if an hour passes and cache is invalid, this must be checked and updated by some process on server, by NginX, Varnish, etc... but not the end user. We don't want to have John wait 10 seconds, he's an impatient guy.
- We don't want to do any caching on application level, no memcahed, no wp_cache plugin nothing like that. It has to be via NginX or Varnish or something like that.
Can I cache these pages and re-cahce them every hour by NginX alone?
Do I need Varnish?
How would I set this up so re-caching is done automatically for all pages?