public async Task <ActionResult <IEnumerable <Country> > > GetCountriesAsync() { var countries = _memoryCacheService.GetCacheData(); if (countries is null) { var newCountries = await _countryService.GetCountriesAsync(); _memoryCacheService.CreateCache(newCountries); return(Ok(newCountries)); } return(Ok(countries)); }