Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RAR] Stop removing from file cache just because an assembly is cache…
…d in process (#6891) Fixes #6844 ### Context RAR has several caches, including a process-wide cache and a (serialized) file cache. Previously, we had the process cache take priority (if it was up-to-date) and removed from the serialized cache, believing that meant some other process had taken "ownership" of serializing the assembly, but that doesn't actually make sense because that other process could be the same process currently looking at this assembly, and even if it were another process, that other process could have removed it from its own file cache. This removes that flawed logic so that we always write to the file cache any information we have. This improves incremental build times. ### Changes Made Stopped removing from file cache when process-wide cache has information. ### Testing Tried without this change and noted that the first few attempted cache lookups all missed. Tried with this change without killing processes and noted that they were cache hits; tried with this change after killing processes, and they were still cache hits. Also noted that without this change, there were 0 things in the instanceLocalFileStateCache at the beginning of the first RAR execution. After it, there were 122. All tests conducted with Ocelot repo. ### Notes I actually mentioned that I didn't think it made sense to have this code here in the "questions" section of my RAR pre-caching document [here](https://microsoft-my.sharepoint.com/:w:/p/nmytelka/EfJOiPG6XPJMsDQ12Nk5-HIBm957qVk2DPB0R5XSpRx1RA?e=6bVaU6) but never looked into it more. Ah, well.
- Loading branch information