# File lib/bundler/source.rb, line 787
      def cache(spec)
        return unless Bundler.settings[:cache_all]
        return if path == app_cache_path
        cached!
        FileUtils.rm_rf(app_cache_path)
        git_proxy.checkout if requires_checkout?
        git_proxy.copy_to(app_cache_path, @submodules)
        FileUtils.rm_rf(app_cache_path.join(".git"))
        FileUtils.touch(app_cache_path.join(".bundlecache"))
      end