Changes all instances of the legacy Cache class to be using ApplicationContext.Current.ApplicationCache.

Fixes: #U4-2039 - ensures macro xslt cache is invalidated in LB scenarios.
This commit is contained in:
Shannon Deminick
2013-04-03 23:39:51 +06:00
parent e14d3fd379
commit 2a7e493c74
9 changed files with 76 additions and 54 deletions

View File

@@ -180,7 +180,7 @@ namespace Umbraco.Core.Cache
/// <param name="getCacheItem"></param>
/// <returns></returns>
public override TT GetCacheItem<TT>(string cacheKey,
TimeSpan timeout, Func<TT> getCacheItem)
TimeSpan? timeout, Func<TT> getCacheItem)
{
return GetCacheItem(cacheKey, null, timeout, getCacheItem);
}
@@ -195,7 +195,7 @@ namespace Umbraco.Core.Cache
/// <param name="getCacheItem"></param>
/// <returns></returns>
public override TT GetCacheItem<TT>(string cacheKey,
CacheItemRemovedCallback refreshAction, TimeSpan timeout,
CacheItemRemovedCallback refreshAction, TimeSpan? timeout,
Func<TT> getCacheItem)
{
return GetCacheItem(cacheKey, CacheItemPriority.Normal, refreshAction, timeout, getCacheItem);
@@ -212,7 +212,7 @@ namespace Umbraco.Core.Cache
/// <param name="getCacheItem"></param>
/// <returns></returns>
public override TT GetCacheItem<TT>(string cacheKey,
CacheItemPriority priority, CacheItemRemovedCallback refreshAction, TimeSpan timeout,
CacheItemPriority priority, CacheItemRemovedCallback refreshAction, TimeSpan? timeout,
Func<TT> getCacheItem)
{
return GetCacheItem(cacheKey, priority, refreshAction, null, timeout, getCacheItem);
@@ -233,7 +233,7 @@ namespace Umbraco.Core.Cache
CacheItemPriority priority,
CacheItemRemovedCallback refreshAction,
CacheDependency cacheDependency,
TimeSpan timeout,
TimeSpan? timeout,
Func<TT> getCacheItem)
{
return GetCacheItem(cacheKey, priority, refreshAction, cacheDependency, timeout, getCacheItem, Locker);
@@ -301,7 +301,7 @@ namespace Umbraco.Core.Cache
/// <param name="getCacheItem"></param>
public override void InsertCacheItem<T>(string cacheKey,
CacheItemPriority priority,
TimeSpan timeout,
TimeSpan? timeout,
Func<T> getCacheItem)
{
InsertCacheItem(cacheKey, priority, null, null, timeout, getCacheItem);
@@ -319,7 +319,7 @@ namespace Umbraco.Core.Cache
public override void InsertCacheItem<T>(string cacheKey,
CacheItemPriority priority,
CacheDependency cacheDependency,
TimeSpan timeout,
TimeSpan? timeout,
Func<T> getCacheItem)
{
InsertCacheItem(cacheKey, priority, null, cacheDependency, timeout, getCacheItem);