using System.Collections.Generic; using Umbraco.Cms.Core.Models; namespace Umbraco.Cms.Infrastructure.PublishedCache.Persistence { /// /// Defines a data source for NuCache. /// public interface INuCacheContentService { // TODO: For these required sort orders, would sorting on Path 'just work'? ContentNodeKit GetContentSource(int id); /// /// Returns all content ordered by level + sortOrder /// /// /// MUST be ordered by level + parentId + sortOrder! /// IEnumerable GetAllContentSources(); /// /// Returns branch for content ordered by level + sortOrder /// /// /// MUST be ordered by level + parentId + sortOrder! /// IEnumerable GetBranchContentSources(int id); /// /// Returns content by Ids ordered by level + sortOrder /// /// /// MUST be ordered by level + parentId + sortOrder! /// IEnumerable GetTypeContentSources(IEnumerable ids); ContentNodeKit GetMediaSource(int id); /// /// Returns all media ordered by level + sortOrder /// /// /// MUST be ordered by level + parentId + sortOrder! /// IEnumerable GetAllMediaSources(); /// /// Returns branch for media ordered by level + sortOrder /// /// /// MUST be ordered by level + parentId + sortOrder! /// IEnumerable GetBranchMediaSources(int id); // must order by level, sortOrder /// /// Returns media by Ids ordered by level + sortOrder /// /// /// MUST be ordered by level + parentId + sortOrder! /// IEnumerable GetTypeMediaSources(IEnumerable ids); void DeleteContentItem(IContentBase item); /// /// Refreshes the nucache database row for the /// void RefreshContent(IContent content); /// /// Refreshes the nucache database row for the (used for media/members) /// void RefreshEntity(IContentBase content); /// /// Rebuilds the database caches for content, media and/or members based on the content type ids specified /// /// The operation batch size to process the items /// If not null will process content for the matching content types, if empty will process all content /// If not null will process content for the matching media types, if empty will process all media /// If not null will process content for the matching members types, if empty will process all members void Rebuild( int groupSize = 5000, IReadOnlyCollection contentTypeIds = null, IReadOnlyCollection mediaTypeIds = null, IReadOnlyCollection memberTypeIds = null); bool VerifyContentDbCache(); bool VerifyMediaDbCache(); bool VerifyMemberDbCache(); } }