Files
Umbraco-CMS/src/Umbraco.Web/PublishedCache/IPublishedSnapshot.cs

62 lines
2.2 KiB
C#
Raw Normal View History

using System;
2017-09-29 15:51:33 +02:00
using Umbraco.Core.Cache;
namespace Umbraco.Web.PublishedCache
{
/// <summary>
2017-10-31 12:48:24 +01:00
/// Specifies a published snapshot.
/// </summary>
2017-10-31 12:48:24 +01:00
/// <remarks>A published snapshot is a point-in-time capture of the current state of
/// everything that is "published".</remarks>
2019-02-14 10:50:08 +01:00
public interface IPublishedSnapshot : IDisposable
{
/// <summary>
/// Gets the <see cref="IPublishedContentCache"/>.
/// </summary>
2017-10-31 12:50:30 +01:00
IPublishedContentCache Content { get; }
/// <summary>
/// Gets the <see cref="IPublishedMediaCache"/>.
/// </summary>
2017-10-31 12:50:30 +01:00
IPublishedMediaCache Media { get; }
/// <summary>
/// Gets the <see cref="IPublishedMemberCache"/>.
/// </summary>
2017-10-31 12:50:30 +01:00
IPublishedMemberCache Members { get; }
/// <summary>
/// Gets the <see cref="IDomainCache"/>.
/// </summary>
2017-10-31 12:50:30 +01:00
IDomainCache Domains { get; }
2016-06-09 18:45:16 +02:00
2017-09-29 15:51:33 +02:00
/// <summary>
2017-10-31 12:48:24 +01:00
/// Gets the snapshot-level cache.
2017-09-29 15:51:33 +02:00
/// </summary>
/// <remarks>
/// <para>The snapshot-level cache belongs to this snapshot only.</para>
/// </remarks>
2019-01-17 11:01:23 +01:00
IAppCache SnapshotCache { get; }
2017-09-29 15:51:33 +02:00
/// <summary>
2017-10-31 12:48:24 +01:00
/// Gets the elements-level cache.
2017-09-29 15:51:33 +02:00
/// </summary>
/// <remarks>
/// <para>The elements-level cache is shared by all snapshots relying on the same elements,
/// ie all snapshots built on top of unchanging content / media / etc.</para>
/// </remarks>
2019-01-17 11:01:23 +01:00
IAppCache ElementsCache { get; }
2017-09-29 15:51:33 +02:00
2016-06-09 18:45:16 +02:00
/// <summary>
2017-10-31 12:48:24 +01:00
/// Forces the preview mode.
2016-06-09 18:45:16 +02:00
/// </summary>
/// <param name="preview">The forced preview mode.</param>
/// <param name="callback">A callback to execute when reverting to previous preview.</param>
/// <remarks>
2017-10-31 12:48:24 +01:00
/// <para>Forcing to false means no preview. Forcing to true means 'full' preview if the snapshot is not already previewing;
/// otherwise the snapshot keeps previewing according to whatever settings it is using already.</para>
2016-06-09 18:45:16 +02:00
/// <para>Stops forcing preview when disposed.</para></remarks>
IDisposable ForcedPreview(bool preview, Action<bool> callback = null);
}
}