Most people know that “cache invalidation” is one of two hard things in computer science (the other one is “naming”) and a strong cache invalidation strategy is as important as your caching strategy. This is because you need to be able to free memory from your storage to make room for new cached content (purging) or you may ban content that should not be cached any more because it is outdated or because it was cached in error and never should have been in cache at all (mistakes happen sometimes).
The days when Varnish has been used strictly for its caching capabilities are long gone, being such a versatile piece of software, its capabilities can be used to tackle more recent challenges.
As a recent convert to the allure of Mac OS, Marius Magureanu, Software Developer at Varnish Software has become an active user. To test out his new playground he set himself on trying an out of the box (github) installation of Varnish Cache 4 and Varnish Agent on both his Mac Mini and Macbook Pro. Although one is less likely to find a real world production server scenario for Mac OS you’ll find below a guideline that will get Varnish Cache up and running on your Mac.