Files
Umbraco-CMS/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedShapshot.cs

60 lines
1.7 KiB
C#
Raw Normal View History

2016-06-09 18:45:16 +02:00
using System;
using Umbraco.Core;
2017-09-29 15:51:33 +02:00
using Umbraco.Core.Cache;
2016-06-09 18:45:16 +02:00
namespace Umbraco.Web.PublishedCache.XmlPublishedCache
{
/// <summary>
2017-10-31 12:48:24 +01:00
/// Implements a published snapshot.
/// </summary>
2017-10-31 12:48:24 +01:00
class PublishedShapshot : IPublishedShapshot
{
/// <summary>
2017-10-31 12:48:24 +01:00
/// Initializes a new instance of the <see cref="PublishedShapshot"/> class with a content cache
/// and a media cache.
/// </summary>
2017-10-31 12:48:24 +01:00
public PublishedShapshot(
PublishedContentCache contentCache,
PublishedMediaCache mediaCache,
PublishedMemberCache memberCache,
DomainCache domainCache)
{
2017-10-31 12:50:30 +01:00
Content = contentCache;
Media = mediaCache;
Members = memberCache;
Domains = domainCache;
}
2017-09-29 15:51:33 +02:00
/// <inheritdoc />
2017-10-31 12:50:30 +01:00
public IPublishedContentCache Content { get; }
2017-09-29 15:51:33 +02:00
/// <inheritdoc />
2017-10-31 12:50:30 +01:00
public IPublishedMediaCache Media { get; }
2017-09-29 15:51:33 +02:00
/// <inheritdoc />
2017-10-31 12:50:30 +01:00
public IPublishedMemberCache Members { get; }
2017-09-29 15:51:33 +02:00
/// <inheritdoc />
2017-10-31 12:50:30 +01:00
public IDomainCache Domains { get; }
2016-06-09 18:45:16 +02:00
2017-09-29 15:51:33 +02:00
/// <inheritdoc />
2017-10-31 12:48:24 +01:00
public ICacheProvider SnapshotCache => null;
2017-09-29 15:51:33 +02:00
/// <inheritdoc />
2017-10-31 12:48:24 +01:00
public ICacheProvider ElementsCache => null;
2017-09-29 15:51:33 +02:00
/// <inheritdoc />
2016-06-09 18:45:16 +02:00
public IDisposable ForcedPreview(bool preview, Action<bool> 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()
{ }
}
}
}