How to see if a cached DataSource is invalid?

I've recently started to work with the ASP.NET 2.0 beta and I'm filled with joy. The new features are really great. I was playing around with the new DataSource caching features. I've created an SqlDataSource that caches some data. Really easy and it looks just like this.
SqlDataSource ds = new SqlDataSource( ConnStr, "SELECT * FROM Table2;" );
ds.EnableCaching = true;
ds.CacheDuration = 30;
GridView grid = new GridView();
grid.DataSource = ds;
grid.DataBind();
this.Form.Controls.Add(grid);
The SqlDataSource looks if the Data is already in cache, and when it isn't, it will query the database and put the data in cache. But how -and here is my question- can I notice if the SqlDataSource has queried the database or has fetched the data from the cache? Is there a property that indicates that the data is in cache or is this easily programmed?
[899 byte] By [DeKale] at [2007-12-16]
# 1

Your best bet would be to ask this question in the ASP.NET forum for the new Data Control features. Here's a link to the forum:
http://forums.asp.net/140/ShowForum.aspx

I hope this information proves helpful.

David Sceppa
ADO.NET Program Manager
Microsoft

DavidSceppa at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...

.NET Development

Site Classified