sharing singleton instance betwen two websites in asp.net mvc with Autofac
<p>I have 2 web applications in mvc5, <em>webapp1</em>, <em>webapp2</em>.
By Autofac, I register this classes:</p>

<pre><code>//cache managers
builder.RegisterType&lt;MemoryCacheManager&gt;().As&lt;ICacheManager().Named&lt;ICacheManager&gt;("snt_cache_static").SingleInstance();
builder.RegisterType&lt;SettingService&gt;().As&lt;ISettingService&gt;().WithParameter(ResolvedParameter.ForNamed&lt;ICacheManager&gt;("snt_cache_static")).InstancePerLifetimeScope();

builder.RegisterType&lt;TestController&gt;()
            .WithParameter(ResolvedParameter.ForNamed&lt;ICacheManager&gt;("snt_cache_static"));
</code></pre>

<p>When I modify and save into database a value with webapp2, I clear the cache and if I compare the new value with the stored in cache, ok, correspond, as once saved was deleted from chache.</p>

<p>However, if I compare the new value with the stored in cache through webapp1,
it is still saved the old value.</p>

<p>the cache of WebApp1 should correspond to that of webapp2, because to read the cache in both sites I use the parameter "_settingService" or "_cacheManager" passed in controller by Autofac: </p>

<pre><code>public TestController(
            ISettingService settingService,
            ICacheManager cacheManager
            )
        {
            this._settingService = settingService; 
            this._cacheManager = cacheManager;
        }
</code></pre>

<p>My question is: how do I share the cache in both applications?</p>