Streamlines how macro cache is handled

This commit is contained in:
Shannon Deminick
2013-03-12 03:00:42 +04:00
parent 164f22aa50
commit ec46d65bb4
18 changed files with 167 additions and 141 deletions

View File

@@ -1,5 +1,6 @@
using System;
using Umbraco.Core;
using Umbraco.Core.Cache;
using umbraco.interfaces;
namespace Umbraco.Web.Cache
@@ -20,7 +21,7 @@ namespace Umbraco.Web.Cache
public void RefreshAll()
{
ApplicationContext.Current.ApplicationCache.ClearCacheByKeySearch("UmbracoUser");
ApplicationContext.Current.ApplicationCache.ClearCacheByKeySearch(CacheKeys.UserCacheKey);
}
public void Refresh(int id)
@@ -30,7 +31,7 @@ namespace Umbraco.Web.Cache
public void Remove(int id)
{
ApplicationContext.Current.ApplicationCache.ClearCacheItem(string.Format("UmbracoUser{0}", id.ToString()));
ApplicationContext.Current.ApplicationCache.ClearCacheItem(string.Format("{0}{1}", CacheKeys.UserCacheKey, id.ToString()));
}
public void Refresh(Guid id)