message: r11s-driver: add whole summary caching
diff: @@ -193,6 +193,7 @@ class ShreddedSummaryDocumentStorageService implements IDocumentStorageService {
  class WholeSummaryDocumentStorageService implements IDocumentStorageService {
  private readonly blobCache: Map<string, ArrayBufferLike> = new Map();
  + private readonly summaryCache: Map<string, IWholeFlatSummary> = new Map();
  private readonly summaryUploadManager: ISummaryUploadManager;
  public get repositoryUrl(): string {
  @@ -245,7 +246,9 @@ class WholeSummaryDocumentStorageService implements IDocumentStorageService {
  requestVersion = versions[0];
  }
  - const wholeFlatSummary: IWholeFlatSummary = await PerformanceEvent.timedExecAsync(
  + let wholeFlatSummary: IWholeFlatSummary | undefined = this.summaryCache.get(requestVersion.id);
  + if (!wholeFlatSummary) {
  + wholeFlatSummary = await PerformanceEvent.timedExecAsync(
  this.logger,
  {
  eventName: "getWholeFlatSummary",
  @@ -259,6 +262,8 @@ class WholeSummaryDocumentStorageService implements IDocumentStorageService {
  return response;
  },
  );
  + this.summaryCache.set(requestVersion.id, wholeFlatSummary);
  + }
  const normalizedWholeSummary = convertWholeFlatSummaryToSnapshotTreeAndBlobs(wholeFlatSummary);
  