Removes RefreshByJson and changes macro cache refreshing to use objects

This commit is contained in:
Shannon
2020-01-23 19:48:15 +11:00
parent a020c52ff6
commit c7b0bf20b0
6 changed files with 12 additions and 43 deletions

View File

@@ -101,19 +101,6 @@ namespace Umbraco.Web.Cache
GetRefresherById(refresherGuid),
payloads.ToArray());
}
/// <summary>
/// Notifies the distributed cache, for a specified <see cref="ICacheRefresher"/>.
/// </summary>
/// <param name="refresherGuid">The unique identifier of the ICacheRefresher.</param>
/// <param name="jsonPayload">The notification content.</param>
public void RefreshByJson(Guid refresherGuid, string jsonPayload)
{
if (refresherGuid == Guid.Empty || jsonPayload.IsNullOrWhiteSpace()) return;
_serverMessenger.PerformRefresh(
GetRefresherById(refresherGuid),
jsonPayload);
}
///// <summary>
///// Notifies the distributed cache, for a specified <see cref="ICacheRefresher"/>.

View File

@@ -11,8 +11,6 @@ using static Umbraco.Web.Cache.LanguageCacheRefresher.JsonPayload;
namespace Umbraco.Web.Cache
{
public sealed class LanguageCacheRefresher : PayloadCacheRefresherBase<LanguageCacheRefresher, LanguageCacheRefresher.JsonPayload>
//CacheRefresherBase<LanguageCacheRefresher>
{
public LanguageCacheRefresher(AppCaches appCaches, IJsonSerializer serializer, IPublishedSnapshotService publishedSnapshotService)
: base(appCaches, serializer)

View File

@@ -70,15 +70,6 @@ namespace Umbraco.Web.Cache
public int Id { get; }
}
// private JsonPayload[] Deserialize(string json)
// {
// return _jsonSerializer.Deserialize<JsonPayload[]>(json);
// }
//
// private string Serialize(params IMemberGroup[] groups)
// {
// return _jsonSerializer.Serialize(groups.Select(x => new JsonPayload(x.Id, x.Name)).ToArray());
// }
#endregion
}