Caching Drupal 7 using boost module and Varnish, yet still getting a "MISS"(
Pay attention to the Cache-Control header returned from Drupal:

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


If Cache-Control is set to no-cache, Varnish will respect it by default. Either you must force caching from within Varnish in vcl_fetch or (much better), make Drupal deliver the proper header (Cache-Control: public, max-age=X). The simplest way to achieve the latter is to enable "Cache pages for anonymous users" in Administration » Configuration » Development and also set "Expiration of cached pages". You can hard-code those settings using:

$conf['cache'] = 1;
$conf['page_cache_maximum_age'] = 3600; // 1h


You also may force the Cache-Control header by adding it explicitely using a custom module by implementing hook_exit. A reasonable save implementation looks something like this:

/**
 * Implements hook_exit().
 *
 * @see drupal_serve_page_from_cache()
 */
function MYMODULE_exit($destination = NULL) {
  // If the client sent a session cookie, a cached copy will only be served
  // to that one particular client due to Vary: Cookie. Thus, do not set
  // max-age &gt; 0, allowing the page to be cached by external proxies, when a
  // session cookie is present unless the Vary header has been replaced or
  // unset in hook_boot().
  $vary_header = drupal_get_http_header('vary');
  $max_age = !isset($_COOKIE[session_name()]) || isset($vary_header) ? variable_get('page_cache_maximum_age', 0) : 0;

  if (drupal_page_is_cacheable() &amp;&amp; $max_age &amp;&amp; $destination == NULL &amp;&amp; !headers_sent()) {
    drupal_add_http_header('Cache-Control', 'public, max-age=' . $max_age);
  }
}


Also note that due to the fact that boost will also add a Cache-Control header, you still need to introduce some VCL logic in vcl_fetch. The following fragment will force Varnish to still store pages in the cache, even when they were delivered using boost with Cache-Control no-cache:

sub vcl_fetch {
  if (beresp.http.X-Cached-By ~ "Boost") {
    set beresp.ttl = 1 h;
  }
}