Exemple #1
0
 private async Task <IList <PCSPlant> > GetAllPlantsForUserAsync(Guid userOid)
 => await _cacheManager.GetOrCreate(
     PlantsCacheKey(userOid),
     async() =>
 {
     var plants = await _plantApiService.GetAllPlantsAsync();
     return(plants);
 },
     CacheDuration.Minutes,
     _options.CurrentValue.PlantCacheMinutes);
Exemple #2
0
        public async Task <IList <PCSPlant> > GetPlantsFromMain()
        {
            var plants = await _plantApiService.GetAllPlantsAsync();

            return(plants);
        }