[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.caching

.NET 2.0 HttpRuntime.Cache Issues

mrjaxon

5/17/2007 9:00:00 PM

We are working on migrating an enterprise web application from 1.1 to
2.0 and we have run into a fairly significant issue in regards to the
caching. The application is designed to cache entire pages in memory
using HttpRuntime.Cache and keep them there till they expire (usually
1 - 3 minutes). The problem we encountered is that .NET 2.0 is overly
aggressive when it reclaims memory and tosses pages out of mem after
only a few seconds because they are "Underused". This means that
pages never stay in cache as long as they are supposed to and the
percentage of pages served from memory goes WAY down.

We have tried a few different solutions to this problem so far
including disabling memory collection altogether in the machine.config
which was somewhat disastrous. We cannot pin pages into the cache
because there are far too many in the system and pinning will lead to
OutOfMemoryErrors. What we really need is for the cache to function
as it did in 1.1 where mem was polled every second or so and expired
pages were removed while others were left alone. Is there any way to
get this functionality (or a similar one) using the 2.0 framework?

1 Answer

Alvin Bruney [MVP]

5/18/2007 7:42:00 PM

0

Not that I know of. You are not the first nor the 31st who has complained
about that.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/...
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley


<mrjaxon@gmail.com> wrote in message
news:1179435602.323460.68080@q23g2000hsg.googlegroups.com...
> We are working on migrating an enterprise web application from 1.1 to
> 2.0 and we have run into a fairly significant issue in regards to the
> caching. The application is designed to cache entire pages in memory
> using HttpRuntime.Cache and keep them there till they expire (usually
> 1 - 3 minutes). The problem we encountered is that .NET 2.0 is overly
> aggressive when it reclaims memory and tosses pages out of mem after
> only a few seconds because they are "Underused". This means that
> pages never stay in cache as long as they are supposed to and the
> percentage of pages served from memory goes WAY down.
>
> We have tried a few different solutions to this problem so far
> including disabling memory collection altogether in the machine.config
> which was somewhat disastrous. We cannot pin pages into the cache
> because there are far too many in the system and pinning will lead to
> OutOfMemoryErrors. What we really need is for the cache to function
> as it did in 1.1 where mem was polled every second or so and expired
> pages were removed while others were left alone. Is there any way to
> get this functionality (or a similar one) using the 2.0 framework?
>