Great AppCaches renaming

This commit is contained in:
Stephan
2019-01-17 11:01:23 +01:00
parent 67e4703821
commit 0bee01e0ee
108 changed files with 1538 additions and 1440 deletions

View File

@@ -35,10 +35,10 @@ namespace Umbraco.Web.Cache
public override void RefreshAll()
{
ClearAllIsolatedCacheByEntityType<IUserGroup>();
var userGroupCache = AppCaches.IsolatedRuntimeCache.GetCache<IUserGroup>();
var userGroupCache = AppCaches.IsolatedCaches.Get<IUserGroup>();
if (userGroupCache)
{
userGroupCache.Result.ClearCacheByKeySearch(UserGroupRepository.GetByAliasCacheKeyPrefix);
userGroupCache.Result.ClearByKey(UserGroupRepository.GetByAliasCacheKeyPrefix);
}
//We'll need to clear all user cache too
@@ -55,11 +55,11 @@ namespace Umbraco.Web.Cache
public override void Remove(int id)
{
var userGroupCache = AppCaches.IsolatedRuntimeCache.GetCache<IUserGroup>();
var userGroupCache = AppCaches.IsolatedCaches.Get<IUserGroup>();
if (userGroupCache)
{
userGroupCache.Result.ClearCacheItem(RepositoryCacheKeys.GetKey<IUserGroup>(id));
userGroupCache.Result.ClearCacheByKeySearch(UserGroupRepository.GetByAliasCacheKeyPrefix);
userGroupCache.Result.Clear(RepositoryCacheKeys.GetKey<IUserGroup>(id));
userGroupCache.Result.ClearByKey(UserGroupRepository.GetByAliasCacheKeyPrefix);
}
//we don't know what user's belong to this group without doing a look up so we'll need to just clear them all