I was testing a new caching implementation for the 20 when I noticed that items I placed in the cache were not staying in the cache.
I ran into this yesterday and luckily I realized what was happening before I did something drastic. The ASP.NET caching facility automagically dumps items out of the cache when roughly 90% of your physical memory is in use. So a laptop with 1 Gig of memory has a pretty good chance of seeing this happen. Load up Visual Studio 2005, Firefox, IE6, the ASP.NET development server and have SQL server running and you are going to get pretty close especially after you've been running all day without restarting any programs or the computer. The two biggest offenders are typically Visual Studio and Firefox in that order. In the defense of Firefox I usually have about 15 to 20 tabs open and I have about 15 extensions installed. Visual Studio can chew up about 400K on its own with all of its child processes running around checking code, looking up help topics etc.
The moral of the story is to shut everything down and then bring it back up so that you have some room cleared out in memory for the obects you want to cache in memory. Seems like a no brainer when you think about it. This is also a good reason to have at least 2GB of memory in your development machine. That's right TWO Gigabytes of memory. Someone at work thought I was crazy when I bought my new home machine with 2GB already installed but after using Visual Studio for a while I knew it would come in handy.