示例#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);
示例#2
0
        public async Task <IList <PCSPlant> > GetPlantsFromMain()
        {
            var plants = await _plantApiService.GetAllPlantsAsync();

            return(plants);
        }