1

Is here a way to share System.Web.Caching between IIS applications?

The simple goal is: share cache in whole box, and can be read/write from any websites on IIS

Is this possible by default System.Web.Caching, or is here any third party application?

Eric Yin
  • 8,737
  • 19
  • 77
  • 118

1 Answers1

3

System.Web.Caching is an in-memory cache that cannot be shared. You will need to use a distributed cache like Velocity, NCache, memcached.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • thats most like for multiple machines or farm. My require is on same machine, from different IIS applications – Eric Yin Jan 26 '12 at 08:24
  • 1
    @EricYin, you still need a distributed cache if you want to share between applications on the same machine as they are different processes. An in-memory cache is stored (as its name suggests) in the memory of the current application to which for obvious reasons other applications do not have access. – Darin Dimitrov Jan 26 '12 at 08:27
  • Is there some matured application that host in memory and answer calls from different process that works as a cache in a same machine? – Eric Yin Jan 26 '12 at 08:33
  • @EricYin, I don't understand your question. You are asking which distributed cache to use? – Darin Dimitrov Jan 26 '12 at 08:33
  • I found another thread answer my question, http://stackoverflow.com/questions/3488478/sharing-cache-between-apps-asp-net-on-the-same-physical-machine – Eric Yin Jan 26 '12 at 08:35