title: Webpack 5 cannot reuse caches in different file structures
body: <ol>
  <li><p>I use the file cache of Webpack5 through the following configuration, and set the cache files in a public folder</p>
  </li>
  <li><p>In the case of the file directory structure unchanged, build again. At this time, caching can be applied successfully, greatly reducing the build time</p>
  </li>
  <li><p>I copied the entire project code to the same directory as testbuild</p>
  </li>
  <li><p>Under the new directory testBuild, execute the build and find that the previously generated cache is not applied. It generates new ones</p>
  </li>
  <li><p>Supplementary Note: This test is to simulate the real CI construction process, and my goal is to significantly reduce the build time on CI construction</p>
  </li>
  </ol>
  <pre><code>cache: {
              type: 'filesystem',
              cacheDirectory: path.resolve(paths.cachePath,'prod-cache'),
    }
  </code></pre>