Any essential differen between AspNetCache and Memory

May 23, 2008 at 9:34 AM
Hi ,
I think the HttpRuntime.Cache also use memory to store object
so any essential differen between AspNetCache and Memory ?




Thanks & Best regards!
Marble Wu(Huobazi)
05/22/2008

------------------------------------------
My blog: http://huobazi.aspxboy.com/
My Site: http://www.aspxboy.com/    http://www.DevEdu.com/   http://www.DotNetJobs.cn/  http://www.daminggong.net/

Coordinator
Jun 19, 2008 at 12:56 PM
huobazi wrote:
Hi ,
I think the HttpRuntime.Cache also use memory to store object
so any essential differen between AspNetCache and Memory ?

Hi,
you are right: both storage provider (Memory and AspNetCache) uses memory as storage location; so: why?
For 3 reasons:
1) to use SmartStorage out of web contexts (windows forms for example)
2) to ensure isolation (asp.net cache is shared)
3) to have more control on memory occupation (see Capacity property in MemoryStorageProviderSettings) or other customizations - in "vNext", maybe :-)

HTH