Well I tried to post this yesterday and then after I had typed the whole thing, my session has expired. I went back and of course SharePoint automatically clears any values in the body textbox. Therefore, I am going to try again.
ASP.NET 2.0 adds many caching improvements that are easy to use. Some of the controls I have already mentioned have this built right in (i.e.: ObjectDataSource and SqlDataSource). To cache with either of these simply set EnableCaching equal to true and set the CacheDuration to the length you want to cache (in seconds). A SqlDataSource with caching looks like this.
<asp:SqlDataSource
ID="SqlDataSource1"
EnableCaching="true"
CacheDuration="600"
ConnectionString="ReservationsConnectionString"
SelectCommand="GetLocations"
Runat="server" />
In this case the SqlDataSource will cache the data for 10 minutes. If you have parameters that might change (i.e.: it is bound to a textbox or something), it will autoamtically store each use of the parameter in the cache. Instead of covering everything about caching like I tried to do yesterday, tomorrow I will cover Sql Cache Invalidation.
Read the complete post at http://www.dotnettipoftheday.com/blog.aspx?id=159