/// <summary>
        /// Gets a <see cref="IEnumerable{CultureInfo}"/> containing <see cref="CultureInfo"/> instances from provided <code>requiredTranslations</code>
        /// which translations are not found in the provided <see cref="MarketDescriptionCacheItem"/>
        /// </summary>
        /// <param name="item">The <see cref="MarketDescriptionCacheItem"/> instance, or a null reference</param>
        /// <param name="requiredTranslations">The <see cref="IEnumerable{CultureInfo}"/> specifying the required languages</param>
        /// <returns>A <see cref="IEnumerable{CultureInfo}"/> containing missing translations or a null reference if none of the translations are missing</returns>
        private IEnumerable <CultureInfo> GetMissingTranslations(MarketDescriptionCacheItem item, IEnumerable <CultureInfo> requiredTranslations)
        {
            var requiredTranslationsList = requiredTranslations?.ToList();

            Guard.Argument(requiredTranslationsList, nameof(requiredTranslationsList)).NotNull().NotEmpty();

            if (item == null)
            {
                //return requiredTranslations;
                //we get only those which was not yet fetched
                if (requiredTranslationsList != null)
                {
                    return(requiredTranslationsList.Where(c => !_fetchedLanguages.Contains(c)));
                }
            }

            if (requiredTranslationsList != null)
            {
                var missingCultures = requiredTranslationsList.Where(c => !item.HasTranslationsFor(c)).ToList();

                return(missingCultures.Any()
                    ? missingCultures
                    : null);
            }

            return(null);
        }
        /// <summary>
        /// Gets a <see cref="IEnumerable{CultureInfo}"/> containing <see cref="CultureInfo"/> instances from provided <code>requiredTranslations</code>
        /// which translations are not found in the provided <see cref="MarketDescriptionCacheItem"/>
        /// </summary>
        /// <param name="item">The <see cref="MarketDescriptionCacheItem"/> instance, or a null reference</param>
        /// <param name="requiredTranslations">The <see cref="IEnumerable{CultureInfo}"/> specifying the required languages</param>
        /// <returns>A <see cref="IEnumerable{CultureInfo}"/> containing missing translations or a null reference if none of the translations are missing</returns>
        private IEnumerable <CultureInfo> GetMissingTranslations(MarketDescriptionCacheItem item, IEnumerable <CultureInfo> requiredTranslations)
        {
            Guard.Argument(requiredTranslations, nameof(requiredTranslations)).NotNull();
            if (!requiredTranslations.Any())
            {
                throw new ArgumentOutOfRangeException(nameof(requiredTranslations));
            }

            if (item == null)
            {
                //return requiredTranslations;
                //we get only those which was not yet fetched
                return(requiredTranslations.Where(c => !_fetchedLanguages.Contains(c)));
            }

            var missingCultures = requiredTranslations.Where(c => !item.HasTranslationsFor(c)).ToList();

            return(missingCultures.Any()
                ? missingCultures
                : null);
        }
        /// <summary>
        /// Merges the provided descriptions with those found in cache
        /// </summary>
        /// <param name="culture">A <see cref="CultureInfo"/> specifying the language of the <code>descriptions</code></param>
        /// <param name="descriptions">A <see cref="IEnumerable{MarketDescriptionDTO}"/> containing market descriptions in specified language</param>
        private void Merge(CultureInfo culture, IEnumerable <MarketDescriptionDTO> descriptions)
        {
            var descriptionList = descriptions?.ToList();

            Guard.Argument(culture, nameof(culture)).NotNull();
            Guard.Argument(descriptionList, nameof(descriptionList)).NotNull().NotEmpty();

            if (descriptionList != null)
            {
                foreach (var marketDescription in descriptionList)
                {
                    var cachedItem = Cache.GetCacheItem(marketDescription.Id.ToString());
                    if (cachedItem == null)
                    {
                        try
                        {
                            cachedItem = new CacheItem(marketDescription.Id.ToString(),
                                                       MarketDescriptionCacheItem.Build(marketDescription, /*_mappingValidatorFactory,*/
                                                                                        culture));
                            Cache.Add(cachedItem, _cacheItemPolicy);
                        }
                        catch (Exception e)
                        {
                            if (!(e is InvalidOperationException))
                            {
                                throw;
                            }

                            CacheLog.LogWarning("Mapping validation for MarketDescriptionCacheItem failed.", e);
                        }
                    }
                    else
                    {
                        ((MarketDescriptionCacheItem)cachedItem.Value).Merge(marketDescription, culture);
                    }
                }

                _fetchedLanguages.Add(culture);
            }
        }