Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nginx caching: tag-based cache-busting like Varnish Hashtwo

We're about to set up a cache and reverse proxy for our site, and we're deciding whether to use Varnish or Nginx. We have complex cache-busting requirements, and we effectively require surrogate key (or tag-based) cache invalidation.

Varnish offers Hashtwo with this functionality. Does Nginx offer this in any form?

like image 611
jdotjdot Avatar asked Oct 18 '22 08:10

jdotjdot


1 Answers

Nginx provides only the Purge method for invalidating cache which is only one of the four methods Varnish offers and not even the best option for your scenario.

Moreover I strongly recommend Varnish over Nginx for caching web pages due to its specific nature of caching tool. Nginx could be pretty good at delivering static content, but it writes all the cached content to disk which is slower compared to Varnish storing it in memory.

like image 177
alejdg Avatar answered Oct 21 '22 06:10

alejdg