title: Can I disable AutoMapper reference cache?
body: <p>I believe AutoMapper is using a cache when it is mapping lists of objects from one type to another.  Take a look at the following code:</p>
  
  <pre><code>namespace ConsoleApplication
  {
      class Program
      {
          static void Main(string[] args)
          {
              Mapper.CreateMap&lt;Source, Destination&gt;()
                         .ForMember(dest =&gt; dest.SomeOtherNumber, opt =&gt; opt.Ignore());
  
              Mapper.AssertConfigurationIsValid();
  
              var sourceList = new List&lt;Source&gt;();
  
              var s1 = new Source {SomeNumber = 10};
              var s2 = new Source {SomeNumber = 69};
  
              sourceList.Add(s1);
              sourceList.Add(s1);
              sourceList.Add(s1);
              sourceList.Add(s2);
  
              var destList = Mapper.Map&lt;List&lt;Source&gt;, List&lt;Destination&gt;&gt;(sourceList);
  
              destList[0].SomeOtherNumber = 100;
  
              destList.ForEach(x =&gt; Console.WriteLine("SomeNumber: {0}, SomeOtherNumber: {1}", x.SomeNumber, x.SomeOtherNumber));
              Console.ReadLine();
          }
      }
  
  
      public class Source
      {
          public int SomeNumber { get; set; }
      }
  
      public class Destination
      {
          public int SomeNumber { get; set; }
          public int SomeOtherNumber { get; set; }
      }
  
  }
  </code></pre>
  
  <p>The output of the code shows that even though I set only the SomeOtherNumber of the first object in the destList list, the first three items have the same property value because they are referencing the same object reference.  I would like to know if I can disable this behavior, so even if I have duplicate references in the source list, I will not have duplicate references in the destination list.  Does this make sense?</p>
  
  <p>Here's the ouput:</p>
  
  <pre><code>SomeNumber: 10, SomeOtherNumber: 100
  SomeNumber: 10, SomeOtherNumber: 100
  SomeNumber: 10, SomeOtherNumber: 100
  SomeNumber: 69, SomeOtherNumber: 0
  </code></pre>