[lnkForumImage]
TotalShareware - Download Free Software

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


 

Chris Zopers

4/10/2009 6:02:00 AM

Hello,

In my ASP.NET projects I often use caching (like Cache["somename"] =
someObject).

On the internet I read different opinions on this. Some saying "use
cache in every layer and as much as possible", others saying "use cache
sparingly, because it uses up server memory".

I thought the server clears items from the cache when it needs memory,
so the memory-issue isn't really an issue, or is it?

But having said that, I often do something like:

if (Cache["somename"] == null)
{
//Add to the Cache
}

But even if the server removed the item when it needs the memory, the
item is shortly after that being cached again!

I just wonder what is a proper way to use the Cache?

Greetings,
Chris


*** Sent via Developersdex http://www.develop... ***