/// <summary>
        /// Returns image based on the tag
        /// </summary>
        /// <param name="tags"></param>
        /// <returns></returns>
        public SearchModel GetImagesByTags(string tags)
        {
            // Load the data from the cache if it exist
            bool fromCache;
            var  model = CacheHelper <SearchModel> .Get(tags, () => flickrRepository.GetImagesByTags(tags), out fromCache);

            model.Cached = fromCache;
            return(model);
        }
示例#2
0
 /// <summary>
 /// Returns image based on the tag
 /// </summary>
 /// <param name="tags"></param>
 /// <returns></returns>
 public List <FlickrImage> GetImagesByTags(string tags)
 {
     // Load the data from the cache if it exist
     return(CacheHelper <List <FlickrImage> > .Get(tags, () => _flickrRepository.GetImagesByTags(tags)));
 }