anchor.diff:          traceWarnfn "Create page cache \"%s\" -- long delay expected" directory.FullName
           directory.Create()
       directory;
  -    
  +
   let private getPageFileContent(pageFileName:String) =
       let pageFileInfo = new FileInfo(pageFileName+".gz")
       if pageFileInfo.Exists then
  -        try 
  +        try
               // File.ReadAllText(pageFileInfo.FullName)
               use archive = File.OpenRead(pageFileInfo.FullName)
               use compressed = new GZipStream(archive,CompressionMode.Decompress)
               use reader = new StreamReader(compressed,Encoding.UTF8)
               reader.ReadToEnd()
  -            |> JsonConvert.DeserializeObject<NugetV3CatalogPage> 
  +            |> JsonConvert.DeserializeObject<NugetV3CatalogPage>
               |> Some
  -        with 
  +        with
           | ex ->
               traceWarnfn "Cannot read/parse %A: %A" pageFileInfo ex
  -            pageFileInfo.Delete() 
  +            pageFileInfo.Delete()
               None
       else None
  -    
  -let private setPageFileContent(pageFileName:String,responseData:String) = 
  +
  +let private setPageFileContent(pageFileName:String,responseData:String) =
       try
           // File.WriteAllText(pageFileName,responseData)
           let bytes = Encoding.UTF8.GetBytes(responseData)
  
positive.code:         compressed.Write(bytes,0,bytes.Length)
      with
      | ex -> traceWarnfn "Cannot over/write %A: %A" pageFileName ex
      
  /// [omit]
  let private getCatalogPage auth (item:NugetV3CatalogIndexItem)(basePath:String) cancel =
      let pageDirectory = getCatalogPageDirectory(basePath,item.Id)
      let pageFileNameOnly = 
          item.Id |> WebUtility.UrlDecode
          |> String.split[|'/'|] |> Array.last 
          |> Path.GetFileNameWithoutExtension
      let pageFileName = Path.Combine(pageDirectory.FullName, pageFileNameOnly)    
      let pageFileData = getPageFileContent pageFileName        
      match pageFileData with
      | Some pageContent when 
          pageContent.CommitId = item.CommitId && 
          pageContent.CommitTimeStamp = item.CommitTimeStamp -> pageContent
      | _ -> 
          use localCancel = new CancellationTokenSource(PackageResolver.RequestTimeout)
          use linkedCancel = 
              CancellationTokenSource.CreateLinkedTokenSource(localCancel.Token,cancel)
          let pageResponse =
              async {
                  return! safeGetFromUrl (auth,item.Id,acceptJson)
              } |> 
              (fun future -> 
                  Async.StartAsTaskProperCancel(future,TaskCreationOptions.None,cancel))
          let responseData = 
              match pageResponse.Result with
              | NotFound -> failwith "Catalog/3.0 Page NotFound/404"; ""
              | Unauthorized -> failwith "Catalog/3.0 Page Unauthorized/401"; ""
              | UnknownError e -> failwithf "Catalog/3.0 Page N/A %A" e; ""
              | SuccessResponse s -> s
          let pageContents = 
              responseData |> JsonConvert.DeserializeObject<NugetV3CatalogPage>
          setPageFileContent(pageFileName,pageContents |> JsonConvert.SerializeObject)
          pageContents;
          
  
  type NugetV3PackageCatalog = {
      Source : String
  
negative.code:                     | Some s -> Some (t, pickRandom s)
                      | None -> None)
                  |> Map.ofSeq
  
              return map
          } |> Async.StartAsTask
  
  