简体   繁体   中英

Sharing cache between apps (asp.net) on the same physical machine

We have several virtual applications inside one main (root) application.

How to share Cache between this virtual application and main application if they are located (and always will be) on the same physical machine?

By Cache i assuming System.Runtime.Caching or System.Web.Caching. Hope that i do not need to setup AppFabric Caching for this...

Memcached is a free, open-source cache that runs as a Windows service. You can very easily accomplish cross-app cacheing by simply defining a key that both apps would use to look for in the memcached object(s).

While others have mentioned the built in ASP.NET Cache (System.Web.Caching), please note that .NET 4.0 introduces a whole new caching framework designed to work outside of the System.Web.Caching namespace:

System.Runtime.Caching

http://msdn.microsoft.com/en-us/library/system.runtime.caching(VS.100).aspx

ASP.Net Cache sharing

Can not be done. Multiple asp.net apps live in their own appdomain, and the appdomain is IIS controlled and may cycle at any time. This means any caching HAS to use networking scenarios (remoting etc.) and the cache better be suited outside the ASP.NET control (system service).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM