Simplifies compression implementation, adds compression options to target all complex editors, ensures the options are per document type/property type

This commit is contained in:
Shannon
2020-08-26 15:57:13 +10:00
parent ba8da3850e
commit 9a06b6291a
20 changed files with 155 additions and 525 deletions

View File

@@ -11,7 +11,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
internal class JsonContentNestedDataSerializer : IContentNestedDataSerializer
{
public ContentNestedData Deserialize(string data)
public ContentNestedData Deserialize(int contentTypeId, string data)
{
// by default JsonConvert will deserialize our numeric values as Int64
// which is bad, because they were Int32 in the database - take care
@@ -30,7 +30,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
return JsonConvert.DeserializeObject<ContentNestedData>(data, settings);
}
public string Serialize(ContentNestedData nestedData)
public string Serialize(int contentTypeId, ContentNestedData nestedData)
{
// note that numeric values (which are Int32) are serialized without their
// type (eg "value":1234) and JsonConvert by default deserializes them as Int64