Is it possible to cache the response of the HTTP handler on the server and on the client?
This is not like a trick:
_context.Response.Cache.SetCacheability (HttpCacheability.Public); _context.Response.Cache.SetExpires (DateTime.Now.AddDays (7));
_context is an HTTPContext passed as an argument to the ProcessRequest method in the IHttpHandler implementation.
Any ideas?
Update: the client caches images uploaded via httphandler, but if the other client makes the same call, the server is not cached. Therefore, for each client that requests an image, the server goes to the database (and filestream). If we use the aspx page instead of the httphandler along with the caching profile, then the images will be cached both on the client and on the server.
source
share