예제 #1
0
        public async Task <CoverArtModel[]> GetArtistCoverArt(Guid mbid)
        {
            var coverArts = await _dataService.GetCoverArtForArtist(mbid);

            var coverArtModels = coverArts as CoverArtModel[] ?? coverArts.ToArray();

            foreach (var coverArtModel in coverArtModels)
            {
                _memoryCache.Set(mbid, coverArtModel, TimeSpan.FromMinutes(5));
            }

            return(coverArtModels);
        }