Boosted Varnish for Drupal - what to do with "Control: no-cache" headers? Per the following article http://www.trellon.com/content/blog/boosted-varnish-high-performance-caching-made-easy#comment-8150 we're attempting to use Boost and Varnish on our Drupal 7 site. 

As for why we want to use Boost and Varnish, it is to limit the impact of restarting/clearing the Varnish cache. 

Anyway, when we install Boost and go to the status report page (/admin/reports/status), there is a message which states:


  Boost will not function properly while Drupal core cache is enabled. Disable Boost or the core cache.


So we disable the core cache. When we do that the following HTTP header gets set: 


  Cache Control: no-cache, must-revalidate, post-check=0, pre-check=0


We re-enable the core cache and the headers read as:


  Cache Control: public, max-age=900


As I understand, a cache control header of no-cache tells upstream proxies like varnish "you aren't allowed to cache this."

So essentially we have a dilemma: Boost requires core cache to be disabled, but disabling core cache makes the site un-cacheable by Varnish.
Leave core-cache enabled and Boost won't work.

How do we get them to play nice together? In other words, how can we disable the core cache to make Boost happy but not have the no-cache header set?
drupal_add_http_header() in your own module will allow you to override Drupal's headers.

Not that it's needed - your headers will only be set to no-cache when you hit Drupal directly. Not for boosted statics. It is a good thing. You want to keep HTML from boost in varnish, after all, not the one generated directly.

I'm proposing to leave it be. Files from Boost cache will not generate these headers, so will be cacheable for varnish. You will only skip caching pages generated on direct Drupal hits. But you want to skip them. They may contain messages, for example. Boost does not cache when there are errors and messages, so leaving no-cache in Drupal will let you to use this behavior and make varnish respect it.