Reputation: 1221
Our cache-control headers only change during deploys of the application. Our current deployment pipeline triggers a BAN on the whole site to flush the cache after a successful deploy. Will this BAN also remove any hit-for-miss and hit-for-pass objects from Varnish? We’re currently using the default 120sec TTL for hit-for-miss, but considering cranking that up significantly if BAN (or PURGE) also removes those objects as things will never magically become cacheable without a deploy
Upvotes: 0
Views: 160
Reputation: 171
Banning, won't flush the cache, it will prevent content from being served and as a matter of fact it will ban content which will stay in cache untile TTL expires or until it gets hit by a request: https://docs.varnish-software.com/tutorials/cache-invalidation/
Purging would be the best approach here
Yes, banning will have effect on every single object you have in cache if you ban i.e. on "ReqURL ~ /"
Upvotes: 1