adds notes, ensures that we optimize property data when using msgpack binary serialization too!

This commit is contained in:
Shannon
2020-08-13 23:32:05 +10:00
parent 9ac2c27110
commit 7d689a6e11
3 changed files with 13 additions and 4 deletions

View File

@@ -97,7 +97,12 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
public ContentNestedData DeserializeBytes(byte[] data) => MessagePackSerializer.Deserialize<ContentNestedData>(data, _options);
public byte[] SerializeBytes(ContentNestedData nestedData) => MessagePackSerializer.Serialize(nestedData, _options);
public byte[] SerializeBytes(ContentNestedData nestedData)
{
Optimize(nestedData);
return MessagePackSerializer.Serialize(nestedData, _options);
}
//private class ContentNestedDataResolver : IFormatterResolver
//{