6 writes to _cache
Microsoft.Build.Tasks.Core (3)
AssemblyDependency\ResolveAssemblyReference.cs (3)
2052_cache = SystemState.DeserializeCache<SystemState>(_stateFile, Log); 2057_cache = SystemState.DeserializePrecomputedCaches(AssemblyInformationCachePaths, Log, fileExists); 2062_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)
2055if (_cache == null && AssemblyInformationCachePaths != null && AssemblyInformationCachePaths.Length > 0) 2060if (_cache == null) 2073_cache.SerializePrecomputedCache(AssemblyInformationCacheOutputPath, Log); 2075else if (!string.IsNullOrEmpty(_stateFile) && (_cache.IsDirty || _cache.instanceLocalOutgoingFileStateCache.Count < _cache.instanceLocalFileStateCache.Count)) 2079_cache.SerializeCache(_stateFile, Log); 2308_cache.SetInstalledAssemblyInformation(installedAssemblyTableInfo); 2311getAssemblyMetadata = _cache.CacheDelegate(getAssemblyMetadata); 2312fileExists = _cache.CacheDelegate(); 2313directoryExists = _cache.CacheDelegate(directoryExists); 2314getDirectories = _cache.CacheDelegate(getDirectories); 2319_cache.SetGetLastWriteTime(path => 2332getAssemblyName = _cache.CacheDelegate(path => 2339getRuntimeVersion = _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];