Enabling Varnish Cache integration only enables cleaning mechanism. It doesn’t make really sense to enable the Varnish Cache integration to clean cache if there’s nothing to clean.
For now, I tagged all .html pages cached by WP Fastest Cache with an header on my VirtualHost:
<Directory ~ "wp\-content\/cache\/all(\/.*)*\/index\.html$">
Header set X-Varnish-Platform "wpfastestcache"
</Directory>
Then, I bypass the default built-in VCL in Varnish:
sub vcl_backend_response {
if (beresp.ttl < 86400s && beresp.http.Content-Type ~ "text/html" && beresp.http.X-Varnish-Platform ~ "wpfastestcache") {
set beresp.ttl = 86400s;
set beresp.grace = 86400s;
return(deliver);
}
}
So it is forcing Varnish to cache page for 1 day (86400 sec) if response Content-Type is text/html and if it is tagged with the header X-Varnish-Platform (so, it is not caching anything that is not cached by WP Fastest Cache, making it to follow all exclusion rules implemented in WP Fastest Cache settings).
However, a proper implementation would be very welcome. The cache timeout settings itself could be served as custom header response on cached HTML pages so any server-side caching system can catch and use it.