Merge branch 'v8/8.15' into v8/dev
This commit is contained in:
@@ -11,6 +11,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
/// </summary>
|
||||
internal class DictionaryOfPropertyDataSerializer : SerializerBase, ISerializer<IDictionary<string, PropertyData[]>>, IDictionaryOfPropertyDataSerializer
|
||||
{
|
||||
private static readonly PropertyData[] Empty = Array.Empty<PropertyData>();
|
||||
public IDictionary<string, PropertyData[]> ReadFrom(Stream stream)
|
||||
{
|
||||
// read properties count
|
||||
@@ -25,6 +26,11 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
|
||||
// read values count
|
||||
var vcount = PrimitiveSerializer.Int32.ReadFrom(stream);
|
||||
if(vcount == 0)
|
||||
{
|
||||
dict[key] = Empty;
|
||||
continue;
|
||||
}
|
||||
|
||||
// create pdata and add to the dictionary
|
||||
var pdatas = new PropertyData[vcount];
|
||||
|
||||
@@ -101,6 +101,10 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
{
|
||||
property.Value = LZ4Pickler.Pickle(Encoding.UTF8.GetBytes((string)property.Value), LZ4Level.L00_FAST);
|
||||
}
|
||||
foreach (var property in propertyAliasToData.Value.Where(x => x.Value != null && x.Value is int intVal))
|
||||
{
|
||||
property.Value = Convert.ToBoolean((int)property.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user