Fixes: U4-3193 Partial view cache needs to invalidate based on cache refreshers

This commit is contained in:
Shannon
2013-10-18 16:13:41 +11:00
parent a87e699f8d
commit d20ea58467
6 changed files with 11 additions and 28 deletions

View File

@@ -111,6 +111,8 @@ namespace Umbraco.Web.Cache
{
if (payloads == null) return;
ApplicationContext.Current.ApplicationCache.ClearPartialViewCache();
payloads.ForEach(payload =>
{
foreach (var idPart in payload.Path.Split(','))

View File

@@ -44,6 +44,8 @@ namespace Umbraco.Web.Cache
private void ClearCache(int id)
{
ApplicationContext.Current.ApplicationCache.ClearPartialViewCache();
ApplicationContext.Current.ApplicationCache.
ClearCacheByKeySearch(string.Format("{0}_{1}", CacheKeys.MemberLibraryCacheKey, id));
ApplicationContext.Current.ApplicationCache.

View File

@@ -1,4 +1,5 @@
using System;
using Umbraco.Core;
using Umbraco.Core.Cache;
using Umbraco.Core.Models;
using Umbraco.Core.Sync;
@@ -60,6 +61,7 @@ namespace Umbraco.Web.Cache
/// <param name="id">The id.</param>
public override void Refresh(int id)
{
ApplicationContext.Current.ApplicationCache.ClearPartialViewCache();
content.Instance.UpdateDocumentCache(id);
DistributedCache.Instance.ClearAllMacroCacheOnCurrentServer();
DistributedCache.Instance.ClearXsltCacheOnCurrentServer();
@@ -72,6 +74,7 @@ namespace Umbraco.Web.Cache
/// <param name="id">The id.</param>
public override void Remove(int id)
{
ApplicationContext.Current.ApplicationCache.ClearPartialViewCache();
content.Instance.ClearDocumentCache(id);
DistributedCache.Instance.ClearAllMacroCacheOnCurrentServer();
DistributedCache.Instance.ClearXsltCacheOnCurrentServer();
@@ -80,6 +83,7 @@ namespace Umbraco.Web.Cache
public override void Refresh(IContent instance)
{
ApplicationContext.Current.ApplicationCache.ClearPartialViewCache();
content.Instance.UpdateDocumentCache(new Document(instance));
DistributedCache.Instance.ClearAllMacroCacheOnCurrentServer();
DistributedCache.Instance.ClearXsltCacheOnCurrentServer();
@@ -88,6 +92,7 @@ namespace Umbraco.Web.Cache
public override void Remove(IContent instance)
{
ApplicationContext.Current.ApplicationCache.ClearPartialViewCache();
content.Instance.ClearDocumentCache(new Document(instance));
DistributedCache.Instance.ClearAllMacroCacheOnCurrentServer();
DistributedCache.Instance.ClearXsltCacheOnCurrentServer();