Beispiel #1
0
        public async Task <IEnumerable <MetaTag> > GetTagList()
        {
            var cacheKey = $"TagList";
            var cached   = await _cacheAccessor.GetEnt <IEnumerable <MetaTag> >(cacheKey);

            if (cached != null && cached.Any())
            {
                return(cached);
            }

            var tags = await _dbAccessor.GetTagList();

            if (tags != null && tags.Any())
            {
                await _cacheAccessor.CacheEnt(cacheKey, tags);
            }

            return(tags);
        }