Asp.net cached objects staying in memory

Posted by GordonB on Stack Overflow See other posts from Stack Overflow or by GordonB
Published on 2010-03-24T11:15:28Z Indexed on 2010/03/24 13:13 UTC
Read the original article Hit count: 262

I have a asp.net web forms app that uses System.Web.Caching.Cache to cache xml data from a number of web services for 2 hours.

  webCacheObj.Remove(dataCacheKey)
  webCacheObj.Insert(dataCacheKey, dataToCache, Nothing, DateTime.Now.AddHours(2), Nothing)

Every 90 minutes a Microsoft Search Server hits a particular (spider) page which calls the code to put the objects into the cache.

The issue i have is that over a period of time, the memory usage of the application grows exponentially. Lets say that in a week, the memory usage of the application pool grows to over 1gb.

I'm using IIS7 and no application pool recycling is currently enabled.

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about ASP.NET