AB3671 - Moved WebRuntime into infrastracutre, and removed typefinder reference in AppCaches (Replaced with string input with Type)..
- Move initialized of Current.Factory out of webruntime
This commit is contained in:
@@ -13,15 +13,13 @@ namespace Umbraco.Core.Cache
|
||||
/// </summary>
|
||||
public class ObjectCacheAppCache : IAppPolicyCache
|
||||
{
|
||||
private readonly ITypeFinder _typeFinder;
|
||||
private readonly ReaderWriterLockSlim _locker = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ObjectCacheAppCache"/>.
|
||||
/// </summary>
|
||||
public ObjectCacheAppCache(ITypeFinder typeFinder)
|
||||
public ObjectCacheAppCache()
|
||||
{
|
||||
_typeFinder = typeFinder ?? throw new ArgumentNullException(nameof(typeFinder));
|
||||
// the MemoryCache is created with name "in-memory". That name is
|
||||
// used to retrieve configuration options. It does not identify the memory cache, i.e.
|
||||
// each instance of this class has its own, independent, memory cache.
|
||||
@@ -178,9 +176,8 @@ namespace Umbraco.Core.Cache
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual void ClearOfType(string typeName)
|
||||
public virtual void ClearOfType(Type type)
|
||||
{
|
||||
var type = _typeFinder.GetTypeByName(typeName);
|
||||
if (type == null) return;
|
||||
var isInterface = type.IsInterface;
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user