Enumerate HttpCache Items?

X

xenophon

I have placed several things into application cache in my ASP.NET 1.1
app, but I don't know their names. How can I enumerate everything in
there so I can extract what I need?

Thanks.
 
K

Kevin Spencer

I looked this up in the .Net SDK. The Cache implements iEnumerator, so you
can call GetEnumerator to fetch the enumerator needed to loop through the
Collection:

object cacheItem;
IDictionaryEnumerator CacheEnum = Cache.GetEnumerator();
while (CacheEnum.MoveNext())
{
cacheItem = CacheEnum.Current;
}

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top