Server Control to dynamically resize image and cache result.

When building websites I often end up with a high resolution image that needs to be displayed in many difference sizes, from thumbnails up.  When I first hit this problem I searched the web and found a lot of advice on building an http handler to resize the image in memory and send it down to the browser.  You end up with code like:

Continued...

Crop, rotate, and resize with asp.net

Introduction

This is an online image editor which allows quick editing of images already uploaded to a server running asp.net. It currently supports:

Continued...

Lost in an instance.

It’s common for programmer’s to cache data in order to improve performance. Constantly reading data from a database or file can be very resource intensive and can significantly slow down a website. I need to remember however that there is no guarantees on what will stay in the cache and what will be pushed out. Obviously I never use the cache to hold data which is not saved in a permanent location, otherwise when the memory fills up that data may be lost forever, but often I see code like this:

Continued...