Fixes: U4-4475 Creating new member doesn't put it in examine. Fixes up some cache refreshers to ensure they are calling the base method so that events fire consistently.

This commit is contained in:
Shannon
2014-03-20 12:36:13 +11:00
parent 2340adbe94
commit 08d4ce7667
6 changed files with 18 additions and 2 deletions

View File

@@ -27,16 +27,19 @@ namespace Umbraco.Web.Cache
public override void RefreshAll()
{
ApplicationContext.Current.ApplicationCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey);
base.RefreshAll();
}
public override void Refresh(int id)
{
Remove(id);
base.Refresh(id);
}
public override void Remove(int id)
{
ApplicationContext.Current.ApplicationCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey);
base.Remove(id);
}
}

View File

@@ -27,16 +27,19 @@ namespace Umbraco.Web.Cache
public override void RefreshAll()
{
ApplicationContext.Current.ApplicationCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey);
base.RefreshAll();
}
public override void Refresh(int id)
{
Remove(id);
base.Refresh(id);
}
public override void Remove(int id)
{
ApplicationContext.Current.ApplicationCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey);
base.Remove(id);
}
}

View File

@@ -47,7 +47,7 @@ namespace Umbraco.Web.Cache
public override void Refresh(IMember instance)
{
ClearCache(instance.Id);
base.Remove(instance);
base.Refresh(instance);
}
public override void Remove(IMember instance)

View File

@@ -32,11 +32,13 @@ namespace Umbraco.Web.Cache
RuntimeCacheProvider.Current.Clear(typeof(IUser));
ApplicationContext.Current.ApplicationCache.ClearCacheByKeySearch(CacheKeys.UserPermissionsCacheKey);
ApplicationContext.Current.ApplicationCache.ClearCacheByKeySearch(CacheKeys.UserContextCacheKey);
base.RefreshAll();
}
public override void Refresh(int id)
{
Remove(id);
base.Refresh(id);
}
public override void Remove(int id)
@@ -48,6 +50,8 @@ namespace Umbraco.Web.Cache
//we need to clear all UserContextCacheKey since we cannot invalidate based on ID since the cache is done so based
//on the current contextId stored in the database
ApplicationContext.Current.ApplicationCache.ClearCacheByKeySearch(CacheKeys.UserContextCacheKey);
base.Remove(id);
}
}

View File

@@ -31,17 +31,20 @@ namespace Umbraco.Web.Cache
public override void RefreshAll()
{
ApplicationContext.Current.ApplicationCache.ClearCacheByKeySearch(CacheKeys.UserPermissionsCacheKey);
ApplicationContext.Current.ApplicationCache.ClearCacheByKeySearch(CacheKeys.UserPermissionsCacheKey);
base.RefreshAll();
}
public override void Refresh(int id)
{
Remove(id);
base.Refresh(id);
}
public override void Remove(int id)
{
ApplicationContext.Current.ApplicationCache.ClearCacheItem(string.Format("{0}{1}", CacheKeys.UserPermissionsCacheKey, id));
base.Remove(id);
}
}
}

View File

@@ -29,16 +29,19 @@ namespace Umbraco.Web.Cache
public override void RefreshAll()
{
RuntimeCacheProvider.Current.Clear(typeof (IUserType));
base.RefreshAll();
}
public override void Refresh(int id)
{
RuntimeCacheProvider.Current.Delete(typeof(IUserType), id);
base.Refresh(id);
}
public override void Remove(int id)
{
RuntimeCacheProvider.Current.Delete(typeof(IUserType), id);
base.Remove(id);
}
}