anchor.diff:            buffer.write(entry.modificationTime);
             buffer.write('</dd>');
             for (ResultDescriptor result in results) {
  -            ResultData data = entry.getResultData(result);
  +            CacheState state = entry.getState(result);
               String descriptorName = HTML_ESCAPE.convert(result.toString());
  -            String descriptorState = HTML_ESCAPE.convert(data.state.toString());
  +            String descriptorState = HTML_ESCAPE.convert(state.toString());
               buffer.write('<dt>$descriptorName ($descriptorState)</dt><dd>');
  -            try {
  -              _writeValueAsHtml(buffer, data.value, linkParameters);
  -            } catch (exception) {
  -              buffer.write('(${HTML_ESCAPE.convert(exception.toString())})');
  +            if (state == CacheState.VALID) {
  +              try {
  +                _writeValueAsHtml(buffer, entry.getValue(result), linkParameters);
  +              } catch (exception) {
  +                buffer.write('(${HTML_ESCAPE.convert(exception.toString())})');
  +              }
               }
               buffer.write('</dd>');
             }
  
positive.code:   }
  
    /**
     * Return `true` if the given analysis [context] has at least one entry with
     * an exception.
     */
  
negative.code:       _writePage(buffer, 'Analysis Server - Analysis Performance', [],
            (StringBuffer buffer) {
          buffer.write('<h3>Analysis Performance</h3>');
          _writeTwoColumns(buffer, (StringBuffer buffer) {
            //
            // Write performance tags.
            //
            buffer.write('<p><b>Performance tag data</b></p>');
            buffer.write(
                '<table style="border-collapse: separate; border-spacing: 10px 5px;">');
            _writeRow(buffer, ['Time (in ms)', 'Percent', 'Tag name'],
                header: true);
            // prepare sorted tags
            List<PerformanceTag> tags = PerformanceTag.all.toList();
            tags.remove(ServerPerformanceStatistics.idle);
            tags.sort((a, b) => b.elapsedMs - a.elapsedMs);
            // prepare total time
            int totalTagTime = 0;
            tags.forEach((PerformanceTag tag) {
              totalTagTime += tag.elapsedMs;
            });
            // write rows
            void writeRow(PerformanceTag tag) {
              double percent = (tag.elapsedMs * 100) / totalTagTime;
              String percentStr = '${percent.toStringAsFixed(2)}%';
              _writeRow(buffer, [tag.elapsedMs, percentStr, tag.label],
                  classes: ["right", "right", null]);
            }
            tags.forEach(writeRow);
            buffer.write('</table>');
            //
            // Write target counts.
            //
            void incrementCount(Map<String, int> counts, String key) {
              int count = counts[key];
              if (count == null) {
                count = 1;
              } else {
                count++;
              }
              counts[key] = count;
            }
            Set<AnalysisTarget> countedTargets = new HashSet<AnalysisTarget>();
            Map<String, int> sourceTypeCounts = new HashMap<String, int>();
            Map<String, int> typeCounts = new HashMap<String, int>();
            analysisServer.folderMap
                .forEach((Folder folder, InternalAnalysisContext context) {
              AnalysisCache cache = context.analysisCache;
              MapIterator<AnalysisTarget, CacheEntry> iterator = cache.iterator();
              while (iterator.moveNext()) {
                AnalysisTarget target = iterator.key;
                if (countedTargets.add(target)) {
                  if (target is Source) {
                    String name = target.fullName;
                    String sourceName;
                    if (AnalysisEngine.isDartFileName(name)) {
                      if (iterator.value.explicitlyAdded) {
                        sourceName = 'Dart file (explicit)';
                      } else {
                        sourceName = 'Dart file (implicit)';
                      }
                    } else if (AnalysisEngine.isHtmlFileName(name)) {
                      if (iterator.value.explicitlyAdded) {
                        sourceName = 'Html file (explicit)';
                      } else {
                        sourceName = 'Html file (implicit)';
                      }
                    } else {
                      if (iterator.value.explicitlyAdded) {
                        sourceName = 'Unknown file (explicit)';
                      } else {
                        sourceName = 'Unknown file (implicit)';
                      }
                    }
                    incrementCount(sourceTypeCounts, sourceName);
                  } else if (target is ConstantEvaluationTarget) {
                    incrementCount(typeCounts, 'ConstantEvaluationTarget');
                  } else {
                    String typeName = target.runtimeType.toString();
                    incrementCount(typeCounts, typeName);
                  }
                }
              }
            });
            List<String> sourceTypeNames = sourceTypeCounts.keys.toList();
            sourceTypeNames.sort();
            List<String> typeNames = typeCounts.keys.toList();
            typeNames.sort();
  
            buffer.write('<p><b>Target counts</b></p>');
            buffer.write(
                '<table style="border-collapse: separate; border-spacing: 10px 5px;">');
            _writeRow(buffer, ['Target', 'Count'], header: true);
            for (String sourceTypeName in sourceTypeNames) {
              _writeRow(
                  buffer, [sourceTypeName, sourceTypeCounts[sourceTypeName]],
                  classes: [null, "right"]);
            }
            for (String typeName in typeNames) {
              _writeRow(buffer, [typeName, typeCounts[typeName]],
                  classes: [null, "right"]);
            }
            buffer.write('</table>');
          }, (StringBuffer buffer) {
            //
            // Write task model timing information.
            //
            buffer.write('<p><b>Task performace data</b></p>');
            buffer.write(
                '<table style="border-collapse: separate; border-spacing: 10px 5px;">');
            _writeRow(
                buffer,
                [
                  'Task Name',
                  'Count',
                  'Total Time (in ms)',
                  'Average Time (in ms)'
                ],
                header: true);
  
            Map<Type, int> countMap = AnalysisTask.countMap;
            Map<Type, Stopwatch> stopwatchMap = AnalysisTask.stopwatchMap;
            List<Type> taskClasses = stopwatchMap.keys.toList();
            taskClasses.sort((Type first, Type second) =>
                first.toString().compareTo(second.toString()));
            int totalTaskTime = 0;
            taskClasses.forEach((Type taskClass) {
              int count = countMap[taskClass];
              if (count == null) {
                count = 0;
              }
              int taskTime = stopwatchMap[taskClass].elapsedMilliseconds;
              totalTaskTime += taskTime;
              _writeRow(buffer, [
                taskClass.toString(),
                count,
                taskTime,
                count <= 0 ? '-' : (taskTime / count).toStringAsFixed(3)
              ], classes: [
                null,
                "right",
                "right",
                "right"
              ]);
            });
            _writeRow(buffer, ['Total', '-', totalTaskTime, '-'],
                classes: [null, "right", "right", "right"]);
            buffer.write('</table>');
          });
        });
      });
    }
  