using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Infrastructure.HybridCache.Serialization;
/// <summary>
/// Serializes/Deserializes <see cref="ContentCacheDataModel" /> document to the SQL Database as a string.
/// </summary>
/// <remarks>
/// Resolved from the <see cref="IContentCacheDataSerializerFactory" />. This cannot be resolved from DI.
/// </remarks>
internal interface IContentCacheDataSerializer
{
/// Deserialize the data into a <see cref="ContentCacheDataModel" />.
ContentCacheDataModel? Deserialize(IReadOnlyContentBase content, string? stringData, byte[]? byteData, bool published);
/// Serializes the <see cref="ContentCacheDataModel" />.
ContentCacheDataSerializationResult Serialize(IReadOnlyContentBase content, ContentCacheDataModel model, bool published);
}