I am inserting a List into data cache in ASP.Net as shown in sample code below. I am using C# as the programming language.

I am not able to find a solution to following problem:

1. A long database operation which could last from .1 s to 20 s is started.
2. **At the end of this operation, I need to determine if the Cache by the name of 'dSummary' has been re-inserted or refreshed from database since the long operation began (i.e. while the operation was in progress).**

The code I use to insert cache item is as below:

```
      List<Doc> ds = GetDocSummary();
   System.Web.HttpContext.Current.Cache.Insert("dSummary", ds, null, 
           DateTime.Now.AddMinutes(15), System.Web.Caching.Cache.NoSlidingExpiration);

```

**UPDATE 1:** 

After getting so many replies, I think a possible foolproof approach would be to store a guid string along with the List object in Cache. Then I could simply compare the guid string property of the object stored in Cache before and after the long operation. If they are the same then Cache["dSummary"] has not been re-inserted, else it has been re-inserted.
So I would need to use the following extended class of 'Doc' class.

```
public class DocX : Doc
 { 
          public UniQueIdentifier { get;set; }
          public DocX ( Doc doc, string unqiueIdentifier)
             {
                  this.Doc = doc;
                  this.UniqueIdentifier = unqiueIdentifier;

            }
 }

```

I would then insert into cache using following code:

```
       List<Doc> ds = GetDocSummary();
       System.Web.HttpContext.Current.Cache.Insert("dSummary",new DocX( ds,  
                new Guid.Newguid().ToString() ), null, 
           DateTime.Now.AddMinutes(15), System.Web.Caching.Cache.NoSlidingExpiration);

```