/// <summary>
    /// Gets the default cache dependencies for the data source.
    /// </summary>
    public override string GetDefaultCacheDependendencies()
    {
        string result = base.GetDefaultCacheDependendencies();

        // Add the document dependencies (based on path and site name)
        if (UseDocumentFilter)
        {
            if (result != null)
            {
                result += "\n";
            }
            result += String.Join("\n", DocumentDependencyCacheKeysBuilder.GetDependencyCacheKeys(siteName, null, aliasPath));
        }

        // Add tag group dependency
        if (tgi != null)
        {
            if (result != null)
            {
                result += "\n";
            }
            result += "cms.taggroup|byid|" + tgi.TagGroupID;
        }

        return(result);
    }
        private static CMSCacheDependency GetPagesCacheDependency(string[] dependencyCacheKeys, IEnumerable <TreeNode> pages)
        {
            var className = pages.First().ClassName;

            dependencyCacheKeys = dependencyCacheKeys ?? new[]
            {
                CacheDependencyKeyProvider.GetDependencyCacheKeyForPageType(SiteContext.CurrentSiteName, className),
                CacheDependencyKeyProvider.GetDependencyCacheKeyForObjectType(className)
            };

            var keys     = new HashSet <string>(dependencyCacheKeys, StringComparer.OrdinalIgnoreCase);
            var pathKeys = pages.Where(page => page.HasUrl())
                           .Select(page => page.NodeAliasPath)
                           .SelectMany(path => DocumentDependencyCacheKeysBuilder.GetParentPathsDependencyCacheKeys(SiteContext.CurrentSiteName, path))
                           .Distinct();

            foreach (var pathKey in pathKeys)
            {
                keys.Add(pathKey);
            }

            return(CacheHelper.GetCacheDependency(keys));
        }