fix deserialization order
This commit is contained in:
@@ -48,7 +48,13 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
|
||||
public ContentCacheDataModel Deserialize(int contentTypeId, string stringData, byte[] byteData)
|
||||
{
|
||||
if (stringData != null)
|
||||
if (byteData != null)
|
||||
{
|
||||
var content = MessagePackSerializer.Deserialize<ContentCacheDataModel>(byteData, _options);
|
||||
Expand(contentTypeId, content);
|
||||
return content;
|
||||
}
|
||||
else if (stringData != null)
|
||||
{
|
||||
// NOTE: We don't really support strings but it's possible if manually used (i.e. tests)
|
||||
var bin = Convert.FromBase64String(stringData);
|
||||
@@ -56,12 +62,6 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
Expand(contentTypeId, content);
|
||||
return content;
|
||||
}
|
||||
else if (byteData != null)
|
||||
{
|
||||
var content = MessagePackSerializer.Deserialize<ContentCacheDataModel>(byteData, _options);
|
||||
Expand(contentTypeId, content);
|
||||
return content;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user