Last post Mar 19, 2013 07:06 AM by Huske
Feb 28, 2013 05:00 AM|NoVoLuMe|LINK
Hi this is my first thread.
Is System.Web.Caching.Cache shared between all w3wp proccess?
Feb 28, 2013 05:03 AM|mm10|LINK
"One instance of this class is created per application domain, and it remains valid as long as the application domain remains active"
Feb 28, 2013 06:23 AM|NoVoLuMe|LINK
i know and i have read all of this page.
if an application domain has one more wp3wp proccess what will be Cache behaviour? it is shared between those proccess or not?
i want to say why i am asking this question.
because of this post
Feb 28, 2013 07:15 AM|Pbalan.in|LINK
Read this below article...
Mar 01, 2013 02:09 AM|NoVoLuMe|LINK
Please read previous posts before reply.
Mar 01, 2013 03:10 AM|mm10|LINK
Your cached objects will be stored in the address space of w3wp.exe so you will have a cache per process.
Mar 05, 2013 12:26 PM|Huske|LINK
System.Web.Caching.Cache is not a distributed caching mechanism. If you plan to use caching in web garden or web farm scenarios, then forget about this caching library. In that case you need something more robust like
AppFabric or memcached. Each w3wp process will have it's own caching contents if you use System.Web.Caching.Cache, thus creating stale and outdated data because in one instance you might be on process 1, while in the other
you might be in process 2. If you update process 2, process 1 will stay with old data. And you have a problem.
Mar 06, 2013 04:16 AM|NoVoLuMe|LINK
Thank you very much. I think so but i was not sure.
I already use memcached but it is very slow on network. Apfabric's warm-up time is very long. When i need to restart appfabric i wait for along time.
Now, I want to extract memcached from my project. I will manage Cache object carefully.
Thank you very much.
Mar 11, 2013 04:59 AM|NoVoLuMe|LINK
I wanto ask same question for HttpApplicationState.
Would you like to answer?
Mar 11, 2013 05:21 AM|Huske|LINK
Mar 11, 2013 07:49 AM|NoVoLuMe|LINK
My question is same :)
Is HttpApplicationState shared between all w3wp?
Mar 19, 2013 07:06 AM|Huske|LINK
According to MSDN documentation HttpApplicationState is not shared between processes when running in a web garden or web farm.
"Application state is not shared across either a Web farm (in which an application is hosted across multiple servers) or a Web garden (in which an application is hosted across multiple processes on the same computer)."
You can see the information
here in the Remarks section.