private async Task RefreshContentAndCheck(CacheData cacheData, bool notify) { try { var ct = await GetServerConfig(cacheData.DataId, cacheData.Group, cacheData.Tenant, 3000L, notify); cacheData.SetContent(ct[0]); if (ct.Count > 1 && ct[1] != null) { cacheData.Type = ct[1]; } cacheData.CheckListenerMd5(); } catch (Exception ex) { _logger?.LogError(ex, "refresh content and check md5 fail ,dataid={0},group={1},tenant={2} ", cacheData.DataId, cacheData.Group, cacheData.Tenant); } }
private async Task RefreshContentAndCheck(CacheData cacheData, bool notify) { try { var resp = await GetServerConfig(cacheData.DataId, cacheData.Group, cacheData.Tenant, 3000L, notify).ConfigureAwait(false); cacheData.SetContent(resp.GetContent()); if (resp.GetConfigType().IsNotNullOrWhiteSpace()) { cacheData.Type = resp.GetConfigType(); } cacheData.CheckListenerMd5(); } catch (Exception ex) { _logger?.LogError(ex, "refresh content and check md5 fail ,dataid={0},group={1},tenant={2} ", cacheData.DataId, cacheData.Group, cacheData.Tenant); } }