コード例 #1
0
        /// <summary>
        /// Gets the content of the dynamic.
        /// </summary>
        /// <param name="placeName">Name of the place.</param>
        /// <returns></returns>
        public DynamicContentItem[] GetDynamicContent(string placeName)
        {
            var session = _customerSession.CustomerSession;
            var tags    = session.GetCustomerTagSet();

            return(Helper.Get(
                       CacheHelper.CreateCacheKey(Constants.DynamicContentCachePrefix, string.Format(DynamicContentCacheKey, placeName, session.CurrentDateTime, tags.GetCacheKey())),
                       () => _service.GetItems(placeName, session.CurrentDateTime, tags),
                       DynamicContentConfiguration.Instance.Cache.DynamicContentTimeout, _isEnabled));
        }