Varnish and squid are professional cache services, and Apache,nginx These are third-party modules to complete
Squid features the most comprehensive, but the architecture is older, performance is not varnish good
Varnish uses the "Visual page cache" Technology, is memory cache, the speed is first-class, but the memory cache also limits its capacity, cache pages and pictures are generally very good
Nginx is a third-party module Ncache to do the buffer, the performance of the basic to achieve varnish, but in the framework of nginx generally as a reverse (static file now with nginx many, concurrent can support to 20,000 +)
In a static architecture, if the front-end is directly facing the CDN, the Nginx cache will suffice.
The above describes the squid varnish nginx do cache what is different, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.