public void ClearCache() { try { _CoverService.ClearCache(); CacheSize = Helper.MakeNiceSize(_CoverService.CacheSize()); } catch (Exception exc) { _Logger.WarnException("Failed to clear cover cache", exc); } CanClearCache = false; }
public async Task ClearCache() { CanClearCache = false; try { await Task.Run(() => _coverService.ClearCache()); CacheSize = Helper.MakeNiceSize(_coverService.CacheSize()); } catch (Exception exc) { _logger.WarnException("Failed to clear cover cache", exc); } finally { CanClearCache = true; } }