title: Output caching in HTTP Handler and SetValidUntilExpires
body: <p>I'm using output caching in my custom HTTP handler in the following way:</p>
  
  <pre><code>    public void ProcessRequest(HttpContext context)
      {
          TimeSpan freshness = new TimeSpan(0, 0, 0, 60);
          context.Response.Cache.SetExpires(DateTime.Now.Add(freshness));
          context.Response.Cache.SetMaxAge(freshness);
          context.Response.Cache.SetCacheability(HttpCacheability.Public);
          context.Response.Cache.SetValidUntilExpires(true);
          ...
      }
  </code></pre>
  
  <p>It works, but the problem is that refreshing the page with F5 leads to page regeneration (instead of cache usage) despite of the last codeline:</p>
  
  <pre><code>context.Response.Cache.SetValidUntilExpires(true);
  </code></pre>
  
  <p>Any suggestions?</p>
  
  <p>UPD: Seems like the cause of problem is that HTTP handler response isn't caching on server. The following code works well for web-form, but not for handler:</p>
  
  <pre><code>        Response.Cache.SetCacheability(HttpCacheability.Server);
  </code></pre>
  
  <p>Are there some specifics of the caching the http handler response on server?</p>