private async Task <Account> GetAccount() { Account data = null; try { UserCache.Clear(HistoryAddressesCacheKey); UserCache.Clear(FavoriteAddressesCacheKey); var account = await UseServiceClientAsync <IAccountServiceClient, Account>(service => service.GetMyAccount()); if (account != null) { CurrentAccount = account; data = account; } } catch (WebException ex) { Mvx.Resolve <IErrorHandler>().HandleError(ex); } catch (Exception ex) { Logger.LogError(ex); } return(data); }
public async void RefreshCache(bool reload) { UserCache.Clear(HistoryAddressesCacheKey); UserCache.Clear(FavoriteAddressesCacheKey); if (reload) { await Task.WhenAll(GetFavoriteAddresses(), GetHistoryAddresses()); } }
public void ClearReferenceData() { UserCache.Clear(RefDataCacheKey); }