We are currently moving our servers to a new one, with PLESK 12.5 which doesn’t support Varnish cache for our PHP applications.
We use Varnish, mostly for the ‘stale-while-revalidate’ capability, so that we can send whole pages or parts (using ESI) without any waiting time for any customer while cache is refreshing.
Is there any alternative to Varnish for a similar kind of cache ? Either another “program” that could run on PLESK, or any PHP/server cache ?
PLESK comes with NGINX, but it does not seem to provide ‘stale-while-revalidate’ capabilities ; I also know Squid isn’t supported on PLESK.
2
Answers
Actually nginx provides stale-while-revalidate by proxy_cache_use_stale and Nginx supports Cache-Control extensions since 1.11.10:
Yes, it does not support Cache-Control extension, with so if your application does not use stale-while-revalidate in Cache-Control header nginx will be enough.You may try to setup Varnish port in Plesk nginx config template:
So for domains in proxy mode requests will be proxied to Varnish and than to Apache on port 7080.