6 writes to _cache
Microsoft.Build.Tasks.Core (3)
AssemblyDependency\ResolveAssemblyReference.cs (3)
2105_cache = SystemState.DeserializeCache<SystemState>(_stateFile, Log); 2110_cache = SystemState.DeserializePrecomputedCaches(AssemblyInformationCachePaths, Log, fileExists); 2115_cache = new SystemState();
Microsoft.Build.Tasks.UnitTests (3)
RARPrecomputedCache_Tests.cs (3)
28_cache = new SystemState() 63_cache = new SystemState() 114_cache = new SystemState()
32 references to _cache
Microsoft.Build.Tasks.Core (15)
AssemblyDependency\ResolveAssemblyReference.cs (15)
2108if (_cache == null && AssemblyInformationCachePaths != null && AssemblyInformationCachePaths.Length > 0) 2113if (_cache == null) 2126_cache.SerializePrecomputedCache(AssemblyInformationCacheOutputPath, Log); 2128else if (!string.IsNullOrEmpty(_stateFile) && (_cache.IsDirty || _cache.instanceLocalOutgoingFileStateCache.Count < _cache.instanceLocalFileStateCache.Count)) 2132_cache.SerializeCache(_stateFile, Log); 2361_cache.SetInstalledAssemblyInformation(installedAssemblyTableInfo); 2364getAssemblyMetadata = _cache.CacheDelegate(getAssemblyMetadata); 2365fileExists = _cache.CacheDelegate(); 2366directoryExists = _cache.CacheDelegate(directoryExists); 2367getDirectories = _cache.CacheDelegate(getDirectories); 2372_cache.SetGetLastWriteTime(path => 2385getAssemblyName = _cache.CacheDelegate(path => 2392getRuntimeVersion = _cache.CacheDelegate(path =>
Microsoft.Build.Tasks.UnitTests (17)
RARPrecomputedCache_Tests.cs (17)
30t._cache.instanceLocalFileStateCache = new Dictionary<string, SystemState.FileState>() { 33t._cache.SetGetLastWriteTime(_ => now); 34_ = t._cache.GetFileState("assembly1"); 35_ = t._cache.GetFileState("assembly2"); 36t._cache.IsDirty = true; 44t._cache.IsDirty = true; 65rarWriterTask._cache.instanceLocalFileStateCache = new() { 68rarWriterTask._cache.SetGetLastWriteTime(_ => now); 70_ = rarWriterTask._cache.GetFileState("path1"); 71rarWriterTask._cache.IsDirty = true; 76rarWriterTask._cache.instanceLocalFileStateCache.Add(dllName, 86rarWriterTask._cache.IsDirty = true; 102rarReaderTask._cache.instanceLocalFileStateCache.ShouldNotContainKey(dllName); 117rarWriterTask._cache.instanceLocalFileStateCache = new Dictionary<string, SystemState.FileState>() { 127rarWriterTask._cache.IsDirty = true; 144rarReaderTask._cache.instanceLocalFileStateCache.ShouldContainKey(dllName); 145SystemState.FileState assembly3 = rarReaderTask._cache.instanceLocalFileStateCache[dllName];