I want to cache pages on my nginx site for fast retrieval. Let's say every 5 hours I want to expire all the cache and have it recreated. Will Varnish make calls to the web-server and recreate cache on it's own or will it have to wait till a user requests a page?
No, Varnish does not generate requests that re-create its caches.
You need to make a manual refresh of the pages in order to get the cache warm.
varnishd - HTTP accelerator daemon, it's not it's job to handle those kind of things, but what you can do is schedule a
cron job (using
wget, etc) that would trigger hitting pages that you like and
Varnish will cache them.
[alexus@wcmisdlin02 ~]$ curl --help | grep -- '--silent' -s/--silent Silent mode. Don't output anything [alexus@wcmisdlin02 ~]$
[alexus@wcmisdlin02 ~]$ wget --help | grep -- '--quiet' -q, --quiet quiet (no output). [alexus@wcmisdlin02 ~]$