Index: pkg/analyzer/lib/src/dart/analysis/byte_store.dart |
diff --git a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart |
index 681ee25831abdf99a900f7f982ee529accd3f98a..ab8e8ed01625a8136f9922404b35a9c78e82b15c 100644 |
--- a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart |
+++ b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart |
@@ -43,12 +43,14 @@ class MemoryCachingByteStore implements ByteStore { |
@override |
List<int> get(String key) { |
- List<int> bytes = _map[key]; |
+ List<int> bytes = _map.remove(key); |
if (bytes == null) { |
bytes = _store.get(key); |
_map[key] = bytes; |
_currentSizeBytes += bytes?.length ?? 0; |
_evict(); |
+ } else { |
+ _map[key] = bytes; |
} |
return bytes; |
} |