title: It was not possible to connect to the redis server(s); to create a disconnected multiplexer
body: <p>I have the following piece of code to connect to azure redis cache.</p>
  <pre><code>   public class CacheConnectionHelper
      {
          private static Lazy&lt;ConnectionMultiplexer&gt; lazyConnection = new Lazy&lt;ConnectionMultiplexer&gt;(() =&gt;
          {
              return ConnectionMultiplexer.Connect(SettingsHelper.AzureRedisCache);
          });
  
          public static ConnectionMultiplexer Connection
          {
              get
              {
                  return lazyConnection.Value;
              }
          }
      }
  </code></pre>
  <p>And I use it this way</p>
  <pre><code>public static List&lt;Models.Module&gt; GetModules()
          {
              IDatabase cache = CacheConnectionHelper.Connection.GetDatabase();
              List&lt;Models.Module&gt; listOfModules = new List&lt;Models.Module&gt;();
              listOfModules = (List&lt;Models.Module&gt;)cache.Get(&quot;ApplicationModules&quot;);
              if (listOfModules == null)
              {
                  listOfModules = dbApp.Modulos.ToList();
                  cache.Set(&quot;ApplicationModules&quot;, listOfModules, TimeSpan.FromMinutes(SettingsHelper.CacheModuleNames));
                  return listOfModules;
              }
              else {
                  return listOfModules;
              }
          }
  </code></pre>
  <p>However 1 or 2 times per day I get this exception:</p>
  <blockquote>
  <p>Additional information: It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. UnableToResolvePhysicalConnection on PING</p>
  </blockquote>
  <p>The question is how can I refactor this code to go to the database in case the cache connection fails?</p>