using System; using Umbraco.Core; using Umbraco.Core.Cache; namespace Umbraco.Web.PublishedCache.XmlPublishedCache { /// /// Implements a published snapshot. /// class PublishedSnapshot : IPublishedSnapshot { /// /// Initializes a new instance of the class with a content cache /// and a media cache. /// public PublishedSnapshot( PublishedContentCache contentCache, PublishedMediaCache mediaCache, PublishedMemberCache memberCache, DomainCache domainCache) { Content = contentCache; Media = mediaCache; Members = memberCache; Domains = domainCache; } /// public IPublishedContentCache Content { get; } /// public IPublishedMediaCache Media { get; } /// public IPublishedMemberCache Members { get; } /// public IDomainCache Domains { get; } /// public ICacheProvider SnapshotCache => null; /// public ICacheProvider ElementsCache => null; /// public IDisposable ForcedPreview(bool preview, Action callback = null) { // the XML cache does not support forcing preview, really, so, just pretend... return new ForcedPreviewObject(); } private class ForcedPreviewObject : DisposableObject { protected override void DisposeResources() { } } } }