/// <summary> /// Gets all cached tags. /// </summary> /// <param name="customerId">The customer identifier.</param> /// <returns></returns> public async Task <HashSet <string> > GetAllCachedTags(int customerId) { var cacheKey = string.Format(TagsIndexKeyTemplate, customerId); var allCachedTags = await cacheProvider.Get <HashSet <string> >( cacheKey, async() => new HashSet <string>(Mapper.Map <IList <Tag>, IList <string> >(await tagsService.FindTags(customerId))) ); return(allCachedTags); }