uses const as config key

This commit is contained in:
Shannon
2021-04-23 15:40:36 +10:00
parent e418bc56c6
commit e434f77f2f
3 changed files with 3 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
{
base.Compose(composition);
var serializer = ConfigurationManager.AppSettings["Umbraco.Web.PublishedCache.NuCache.Serializer"];
var serializer = ConfigurationManager.AppSettings[NuCacheSerializerComponent.Nucache_Serializer_Key];
if (serializer != "MsgPack")
{
// TODO: This allows people to revert to the legacy serializer, by default it will be MessagePack

View File

@@ -15,7 +15,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
/// </summary>
public class NuCacheSerializerComponent : IComponent
{
private const string Nucache_Serializer_Key = "Umbraco.Web.PublishedCache.NuCache.Serializer";
internal const string Nucache_Serializer_Key = "Umbraco.Web.PublishedCache.NuCache.Serializer";
private const string JSON_SERIALIZER_VALUE = "JSON";
private readonly Lazy<IPublishedSnapshotService> _service;
private readonly IKeyValueService _keyValueService;

View File

@@ -228,7 +228,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
var okMedia = false;
if (_syncBootStateAccessor.GetSyncBootState() == SyncBootState.ColdBoot)
{
_logger.Warn<PublishedSnapshotService>("Sync Service is in a Cold Boot state. Skip LoadCachesOnStartup as the Sync Service will trigger a full reload");
_logger.Info<PublishedSnapshotService>("Sync Service is in a Cold Boot state. Skip LoadCachesOnStartup as the Sync Service will trigger a full reload");
_isReady = true;
return;
}