title: Django per-site caching and Vary: Cache
body: <p>I noticed that my per-site caching does not work because page response headers include:</p>
  
  <pre><code>Vary:Cookie
  </code></pre>
  
  <p>Since I have google analytics installed it will update cookie on every page load which would make cache unusable.</p>
  
  <p>I am not sure if I have added Vary:Cookie to page response headers implicitly or where it comes from. Any help appreciated. </p>
  
  <p>Django 1.3.1</p>
  
  <p><strong>UPDATE:</strong> </p>
  
  <p>it turns out that when <code>session</code> middleware is included and <code>session</code> is accessed, it will add <code>Vary:Cookie</code>header to response. In my case reason is that 3rd party app is accessing session.</p>