This bundle provides services to help with various cache invalidation concepts and also documents the configuration for a couple of common caching proxies. This way, the new content is already available in the cache.The drawback of refreshing is that variants are not invalidated.The best way would be to let Varnish Cache keep the object in memory forever (mostly) and then tell the object when to refresh. HTTP Purging is the most straightforward of these methods.Instead of sending a HTTP purging falls short when a piece of content has a complex relationship to the URLs it appears on.A ban is a feature specific to Varnish and one that is frequently misunderstood.
This allows the cache to provide fast responses and reduces the load on your application. A way out of this dilemma is to use long cache lifetimes, but to actively notify the gateway cache when content changes.A news article, for instance, might show up on a number of URLs.The article might have a desktop view and a mobile view, and it might show up on a section page and on the front page.You could tell Varnish to ban by giving the ban command in the command-line interface, typically connecting to it with . First, the ban command puts the ban on the “ban list.” When this command is on the ban list, every cache hit that serves an object older than the ban itself will start to look at the ban list and compare the object to the bans on the list.You could also do it through the Varnish configuration language (VCL), which provides a simple way to implement HTTP-based banning. Suppose we need to purge our website of all images. If the object matches, then Varnish kills it and fetches a newer one.