Concurrent Caching
Hi,
in an ASP.NET 2.0 application i am using the SqlDataSource for data access, and am using the embedded caching in this data sources, but i want to exclusively lock the cache once one request is retrieving the data from the cache, i used to use the 'lock' structure in C# to do that like the following:
lock(Cache["CahedData"])
{
//My critical code...
}
so i was looking to do the same cause i thought that the cache will be a member of SqlDataSource but it is not (SqlDataSource.Cache not available).
is there away to do that.
|