Beispiel #1
0
 private void CheckCaching(IndexInformation indexInformation, byte[] data)
 {
     byte.TryParse(Utility.GetAppSetting(Constant.AppSetting_CacheFetchCount), out byte cacheFetchCount);
     if (cacheFetchCount > 0 && indexInformation.FetchTimes >= cacheFetchCount)
     {
         Utility.ConsoleWriteLine($"StartCaching FetchTimes: {indexInformation.FetchTimes}");
         indexInformation.Cache(data);
         Utility.ConsoleWriteLine($"EndCaching FetchTimes: {indexInformation.FetchTimes}");
     }
     else
     {
         indexInformation.IncreaseFetchTimes();
     }
 }