I am using HttpContext.Current.Cache to store some values in a web service
method.
I have a page in the same web application that simply dumps the contents of
Page.Cache to the screen.
Why is it that every time I refresh the dump page, different items appear?
Nobody is using the application or calling any web services except me.
What's even more mysterious, sometimes items that disappeared hours ago come
back again!
I've tried it on two machines, both running framework 1.1.
Everything works as you would expect on an XP Pro machine running IIS 5.1.
Once I started testing on a 2k3 server machine running IIS 6, the Cache
started hidding items and bringing them back randomly.
This problem is very frustrating. Any advice would be great.
Nathan
Nathan Baulch - 19 Sep 2003 01:15 GMT
> I am using HttpContext.Current.Cache to store some values in a web
> service method.
[quoted text clipped - 10 lines]
> 5.1. Once I started testing on a 2k3 server machine running IIS 6,
> the Cache started hidding items and bringing them back randomly.
Solution: Turn application pooling off.
IIS6 seems to default to heavier pooling that IIS5. Unfortunately cache is
specific to the thread that is serving the application and thus you should
never rely on the cache as a means of passing data around.