title: how to cache post requests with varnish?
body: <p>I use varnish with docker - see <a href="https://registry.hub.docker.com/u/million12/varnish/" rel="nofollow">million12/varnish</a></p>
  
  <p>GET requests work great !</p>
  
  <p>but i have no idea what i have to set in the settings to cache POST requests.</p>
  
  <p>on google i have found many posts (from 2010 or 2011) where it says that POST requests can not be cached with varnish - is this statement still correct?</p>
  
  <p>Or is there another way to cache POST requests?</p>
  
  <p>here my <strong>varnish.vcl</strong> settings:</p>
  
  <pre><code>vcl 4.0;
  backend default {
      ...
  }
  
  # Respond to incoming requests.
  sub vcl_recv {
    unset req.http.Cookie;
  }
  
  # Set a header to track a cache HIT/MISS.
  sub vcl_deliver {
    if (obj.hits &gt; 0) {
      set resp.http.X-Varnish-Cache = "HIT";
    }
    else {
      set resp.http.X-Varnish-Cache = "MISS";
    }
  }
  
  # Not cache 400 - 500 status requests
  sub vcl_backend_response {
      if (beresp.status &gt;= 400 &amp;&amp; beresp.status &lt;= 600) {
          set beresp.ttl = 0s;
    }
  }
  </code></pre>
  
  <p>Thanks for help !</p>