Im creating an image that has text, for each client the image contains its own name, and I use the Graphics.DrawString function to create this on the fly, however I will not need to create this image more than once, simply because the clientβs name is unlikely will change, but I do not want to store it on disk.
Now I create the image in the ie handler:
<asp:Image ID="Image1" runat="server" ImageUrl="~/imagehandler.ashx?contactid=1" />
What is the best way to cache the returned image? Should I cache the bitmap that it creates? Or cache the stream I am transmitting? And which cache object should I use, I understand that there are many different ways? But does output caching not work on HTTP handlers? What is the recommended way? (I'm not worried about client side caching, I'm server side) Thanks!
David source share