public async Task <IActionResult> Get(CancellationToken cancellationToken)
        {
            var weatherForecast =
                await _weatherForecastService.GetWeatherForecastAsync(cancellationToken);

            return(Ok(weatherForecast));
        }
 public async Task<IEnumerable<WeatherForecast>> Get()
 {
     var cacheKey = "WeatherForecast";
     var forecast = await _distributedCache.GetRecordAsync<IEnumerable<WeatherForecast>>(cacheKey);
     if (forecast is null)
     {
         forecast = await _weatherForecastService.GetWeatherForecastAsync();
         await _distributedCache.SetRecordAsync(cacheKey, forecast);
     }
     return forecast;
 }