The following use-cases are some popular ones for using Nginx as a cache server:
In addition to its ability to serve static files directly, Nginx can act as a cache server - what this means is that Nginx can cache content received from other servers. This is a common architecture, but users of PHP might be used to Apache + Apache's mod_php, which puts PHP "inside of" Apache, making it seem like everything is in one magical (but less efficient) place. However, since Nginx can proxy requests to other web servers or to applications (via HTTP, FastCGI and uWSGI), it's commonly used to increase performance for serving static files while proxying application requests to other processes. This is a typical use case of a web server, rather than a cache server. Nginx handles static content well on it's own. This is especially true if you happen to use Nginx Plus, which comes with support and extra features. If your traffic warrants adding a layer of infrastructure for caching, but not the overhead of introducing new technologies that need to be learned and maintained, Nginx might be a better fit. While Varnish is a pure web cache with more advanced cache-specific features than Nginx, Nginx may still be a perfect match for you. Nginx can also act as a "true" cache server when placed in front of application servers, just like you might with Varnish.This is good when the static files are on the same server as Nginx. Nginx can serve static content (directly) very, very efficiently.However, there are two things to know about Nginx: Many administrators reach for Varnish, often before it's really needed. Like Varnish, Nginx is a very capable web cache.