title: How is ReuseCabinetCache used in a WIX install
body: <p>Similiar question: <a href="https://stackoverflow.com/questions/1207020/reusing-wix-components-to-speed-up-candle-light">Reusing WIX components to speed up candle/light</a></p>
  
  <p>My project has the very same problem as the one referenced; a very large static database that never changes is compressed into the msi every time a build is required. I would like to do as the question asks: reuse a pre-compressed cab file to speed up the build time.</p>
  
  <p>I started doing as the answer suggests, using the cabCache property. I added the following to the .wixproj: </p>
  
  <pre><code>&lt;CabinetCachePath&gt;cabs&lt;/CabinetCachePath&gt;
  &lt;ReuseCabinetCache&gt;True&lt;/ReuseCabinetCache&gt;
  </code></pre>
  
  <p>I then seperated the static data into a fragment:</p>
  
  <pre><code>&lt;Fragmet&gt;
    &lt;Media Id="2" Cabinet="static.cab" EmbedCab="no" /&gt;
    &lt;Component Id="staticCab" Guid="..." &gt;
      Files ...
    &lt;/Component&gt;
  </code></pre>
  
  <p>And the fragment was referenced in the feature:</p>
  
  <pre><code>&lt;ComponentRef Id="staticCab" /&gt;
  </code></pre>
  
  <p>This created the cab file, but left it empty. My next thought was the use a Merge Module. I created the module:</p>
  
  <pre><code>&lt;Module Id="StaticModule" Language="1033" Version="1.0.0.0" &gt;
    &lt;Package ...&gt;
      &lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
        &lt;Directory Id="MergeRedirectFolder" Name="."&gt;
          &lt;Component Id="StaticFiles" Guid="..."&gt;
            Files...
          &lt;/ -- End all XML Tags
  </code></pre>
  
  <p>And then merged it:</p>
  
  <pre><code>&lt;Directory Id="StaticDir" Name="static"&gt;
    &lt;Merge Id="StaticModule" Language="1033" src="..\Static\bin\Release\static.msm" /&gt;
  &lt;/Directory&gt;
  
  &lt;Feature ...&gt;
    &lt;MergeRef Id="StaticModule"/&gt;
  &lt;/Feature&gt;
  </code></pre>
  
  <p>Even after all this, the CabinetCache is still being rebuilt every time.</p>
  
  <p>I guess my question would be what is the correct way to use ReuseCabinetCache. I'm still learning WIX, so I apologize if the answer is evident. I just am not sure how to use it.</p>
  
  <p><strong>Edit:</strong> A MergeModule would not be ideal since there is no need to share that logic with other msi's. It is only useful to this single project to a single development team.</p>