Fix composition. Store compression options in map

This commit is contained in:
nzdev
2020-08-04 18:01:06 +12:00
parent d1449a0f5c
commit d4276dff58
8 changed files with 51 additions and 23 deletions

View File

@@ -14,7 +14,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
private MessagePackSerializerOptions _options;
private readonly NucachePropertyOptions _propertyOptions;
public MsgPackContentNestedDataSerializer(NucachePropertyOptions propertyOptions = null)
public MsgPackContentNestedDataSerializer(INuCachePropertyOptionsFactory propertyOptionsFactory = null)
{
var defaultOptions = ContractlessStandardResolver.Options;
@@ -34,7 +34,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
_options = defaultOptions
.WithResolver(resolver)
.WithCompression(MessagePackCompression.Lz4BlockArray);
_propertyOptions = propertyOptions ?? new NucachePropertyOptions();
_propertyOptions = propertyOptionsFactory?.GetNuCachePropertyOptions() ?? new NucachePropertyOptions();
}
public string ToJson(string serialized)