anchor.diff:      return result;
     }
   
  +  /// An in-memory cache to store the cached version listing loaded from
  +  /// [_versionListingCachePath].
  +  ///
  +  /// Invariant: Entries in this cache are the parsed version of the exact same
  +  ///  information cached on disk. I.e. if the entry is present in this cache,
  +  /// there will not be a newer version on disk.
  +  final Map<PackageRef, Pair<DateTime, Map<PackageId, _VersionInfo>>>
  +      _responseCache = {};
  +
     /// If a cached version listing response for [ref] exists on disk and is less
     /// than [maxAge] old it is parsed and returned.
     ///
  
positive.code:   Future<Map<PackageId, _VersionInfo>> _cachedVersionListingResponse(
        PackageRef ref,
        {Duration maxAge}) async {
      final cachePath = _versionListingCachePath(ref);
      final stat = io.File(cachePath).statSync();
      final now = DateTime.now();
      if (stat.type == io.FileSystemEntityType.file) {
        if (maxAge == null || now.difference(stat.modified) < maxAge) {
          try {
            final cachedDoc = jsonDecode(await readTextFileAsync(cachePath));
            final timestamp = cachedDoc['_fetchedAt'];
            if (timestamp is String) {
              final cacheAge =
                  DateTime.now().difference(DateTime.parse(timestamp));
              if (maxAge != null && cacheAge > maxAge) {
                // Too old according to internal timestamp - delete.
                tryDeleteEntry(cachePath);
              } else {
                return _versionInfoFromPackageListing(
                  cachedDoc,
                  ref,
                  Uri.file(cachePath),
                );
              }
            }
          } on io.IOException {
  
negative.code:           },
          ),
        );
        // Delete the entry in the in-memory cache to maintain the invariant that
        // cached information in memory is the same as that on the disk.
        _responseCache.remove(ref);
      } on io.IOException catch (e) {
        // Not being able to write this cache is not fatal. Just move on...
        log.fine('Failed writing cache file. $e');
  