2016-06-10 16:37:28 +02:00
|
|
|
|
using System;
|
2017-09-29 15:51:33 +02:00
|
|
|
|
using Umbraco.Core.Cache;
|
2016-06-10 16:37:28 +02:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.PublishedCache
|
2016-05-26 17:12:04 +02:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2017-10-31 12:48:24 +01:00
|
|
|
|
/// Specifies a published snapshot.
|
2016-05-26 17:12:04 +02:00
|
|
|
|
/// </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
|
2016-05-26 17:12:04 +02:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the <see cref="IPublishedContentCache"/>.
|
|
|
|
|
|
/// </summary>
|
2017-10-31 12:50:30 +01:00
|
|
|
|
IPublishedContentCache Content { get; }
|
2016-05-26 17:12:04 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the <see cref="IPublishedMediaCache"/>.
|
|
|
|
|
|
/// </summary>
|
2017-10-31 12:50:30 +01:00
|
|
|
|
IPublishedMediaCache Media { get; }
|
2016-05-26 17:12:04 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the <see cref="IPublishedMemberCache"/>.
|
|
|
|
|
|
/// </summary>
|
2017-10-31 12:50:30 +01:00
|
|
|
|
IPublishedMemberCache Members { get; }
|
2016-05-26 17:12:04 +02:00
|
|
|
|
|
|
|
|
|
|
/// <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>
|
2018-05-02 13:38:45 +02:00
|
|
|
|
/// <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>
|
2018-05-02 13:38:45 +02:00
|
|
|
|
/// <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);
|
2016-05-26 17:12:04 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|