title: Caching the response of an ASP.NET HTTP Handler server and client side
body: <p>Is it possible to cache the response of a http handler on the server and on the client?</p>
  
  <p>This doesn't seem to be doing the trick:</p>
  
  <p>_context.Response.Cache.SetCacheability(HttpCacheability.Public);
   _context.Response.Cache.SetExpires(DateTime.Now.AddDays(7));</p>
  
  <p>The _context is the HTTPContext passed as an argument to the ProcessRequest method on the IHttpHandler implementation.</p>
  
  <p>Any ideas?</p>
  
  <p>Update: The client does cache images that are loaded through the httphandler, but if another client does the same call, the server hasn't got it cached. So for each client that asks for the image, the server goes to the database (and filestream). If we use a aspx page instead of a httphandler together with a caching profile, then the images are cached both on the client and the server.</p>