Question

I'm using HttpContext.Current.Items to make a Per-Request Cache Store. I'm experiencing strange problems because I'm hitting to many Cache entries over different http requests.

It seems that HttpContext.Current.Items is reused across multiple http requests. Is it normal?

Was it helpful?

Solution

It was my fault. I was saving HttpContext.Current.Items in a static variable...

OTHER TIPS

HttpContext.Current.Items is supposed to be scoped on a per HTTP request. Have you confirmed on subsequent HTTP requests that there still are the same number of Items cached? Perhaps by checking the Items count before any code populates it?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top