Add work on PublishedSnapshotService

This commit is contained in:
Nikolaj
2020-09-15 08:45:40 +02:00
parent 5e17aa3bf1
commit 02828db8fd
52 changed files with 255 additions and 254 deletions

View File

@@ -23,11 +23,11 @@ namespace Umbraco.Web.PublishedCache
private readonly IMediaTypeService _mediaTypeService;
private readonly IMemberTypeService _memberTypeService;
private readonly IPublishedContentTypeFactory _publishedContentTypeFactory;
private readonly ILogger _logger;
private readonly ILogger<PublishedContentTypeCache> _logger;
private readonly ReaderWriterLockSlim _lock = new ReaderWriterLockSlim();
// default ctor
public PublishedContentTypeCache(IContentTypeService contentTypeService, IMediaTypeService mediaTypeService, IMemberTypeService memberTypeService, IPublishedContentTypeFactory publishedContentTypeFactory, ILogger logger)
public PublishedContentTypeCache(IContentTypeService contentTypeService, IMediaTypeService mediaTypeService, IMemberTypeService memberTypeService, IPublishedContentTypeFactory publishedContentTypeFactory, ILogger<PublishedContentTypeCache> logger)
{
_contentTypeService = contentTypeService;
_mediaTypeService = mediaTypeService;
@@ -37,7 +37,7 @@ namespace Umbraco.Web.PublishedCache
}
// for unit tests ONLY
internal PublishedContentTypeCache(ILogger logger, IPublishedContentTypeFactory publishedContentTypeFactory)
internal PublishedContentTypeCache(ILogger<PublishedContentTypeCache> logger, IPublishedContentTypeFactory publishedContentTypeFactory)
{
_logger = logger;
_publishedContentTypeFactory = publishedContentTypeFactory;
@@ -50,7 +50,7 @@ namespace Umbraco.Web.PublishedCache
/// </summary>
public void ClearAll()
{
_logger.Debug<PublishedContentTypeCache>("Clear all.");
_logger.LogDebug("Clear all.");
try
{
@@ -72,7 +72,7 @@ namespace Umbraco.Web.PublishedCache
/// <param name="id">An identifier.</param>
public void ClearContentType(int id)
{
_logger.Debug<PublishedContentTypeCache>("Clear content type w/id {ContentTypeId}", id);
_logger.LogDebug("Clear content type w/id {ContentTypeId}", id);
try
{
@@ -107,7 +107,7 @@ namespace Umbraco.Web.PublishedCache
/// <param name="id">A data type identifier.</param>
public void ClearDataType(int id)
{
_logger.Debug<PublishedContentTypeCache>("Clear data type w/id {DataTypeId}.", id);
_logger.LogDebug("Clear data type w/id {DataTypeId}.", id);
// there is no recursion to handle here because a PublishedContentType contains *all* its
// properties ie both its own properties and those that were inherited (it's based upon an