public async Task <IReadOnlyCollection <Credit> > GetAllAsync() { IReadOnlyCollection <Credit> credits = _cache.GetAll(); if (credits == null) { credits = await _creditRepository.GetAllAsync(); _cache.Initialize(credits); } return(credits); }