title: Multiple DataCacheClients - Strange configuration behaviour
body: <p>I am using Azure's In-Role caching for our web role cluster.</p>
  
  <p>I need to use separate <code>dataCacheClients</code> so to have different and explicitly set transport property configurations (<code>maxBufferPoolSize</code> and <code>maxBufferSize</code>).</p>
  
  <p>The problem is that each <code>dataCacheClient</code> is always set with the same <code>maxBufferPoolSize</code> and <code>maxBufferSize</code> values.  They are all set to the values from the <code>dataCacheFactory</code> which I instantiate first.</p>
  
  <pre><code>&lt;dataCacheClients&gt;
    &lt;dataCacheClient name="DataCache1"&gt;
      &lt;autoDiscover isEnabled="true" identifier="MyRoleName" /&gt;
      &lt;transportProperties maxBufferPoolSize="6400000" maxBufferSize="256" /&gt;
    &lt;/dataCacheClient&gt;
    &lt;dataCacheClient name="DataCache2"&gt;
      &lt;autoDiscover isEnabled="true" identifier="MyRoleName" /&gt;
      &lt;transportProperties maxBufferPoolSize="0" maxBufferSize="10485760" /&gt;
    &lt;/dataCacheClient&gt;
    &lt;dataCacheClient name="DataCache3"&gt;
      &lt;autoDiscover isEnabled="true" identifier="MyRoleName" /&gt;
      &lt;transportProperties maxBufferPoolSize="3276800" maxBufferSize="32768" /&gt;
    &lt;/dataCacheClient&gt;
  &lt;/dataCacheClients&gt;
  </code></pre>
  
  <p>Each concrete <code>DataCache</code> object is instantiated from separate <code>DataCacheFactory</code> instances (contained inside static 'managers').  I have also tried reverting to creating the cache clients programmatically, but to no avail.</p>
  
  <p>So, here is an exception being thrown due to MaxBufferSize being too small at 256.</p>
  
  <p><img src="https://i.stack.imgur.com/TBShq.png" alt="DataCacheException thrown"></p>
  
  <p>When debugging the factory, you can clearly see that the MaxBufferSize is not 256:</p>
  
  <p><img src="https://i.stack.imgur.com/B0W4e.png" alt="MaxBufferSize debugging"></p>
  
  <p>I am starting to pull my hair out, so I've come up with the two ideas:</p>
  
  <p>My suspicion is that the <code>StartPort</code> and <code>DiscoveryPort</code> in each data clients' <code>AutoDiscoveryProperties</code> are the same across all (22233 as <code>StartPort</code> and 24233 as <code>DiscoveryPort</code>), which makes me believe that they could be pulling from the same factory (and thus using the same settings).</p>
  
  <p>In addition, the <code>DataCacheServerEndpoint</code> for each client is also the same, at 20004.  Perhaps they need to be different?</p>
  
  <p>I am using Microsoft.WindowsAzure.Caching 2.4.0.0 and Azure SDK 2.4.</p>
  
  <p><strong>Can anyone help point me in the right direction?</strong> </p>