diff --git a/src/Umbraco.Core/Cache/CacheRefresherCollectionBuilder.cs b/src/Umbraco.Abstractions/Cache/CacheRefresherCollectionBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Cache/CacheRefresherCollectionBuilder.cs
rename to src/Umbraco.Abstractions/Cache/CacheRefresherCollectionBuilder.cs
diff --git a/src/Umbraco.Core/Cache/FastDictionaryAppCache.cs b/src/Umbraco.Abstractions/Cache/FastDictionaryAppCache.cs
similarity index 80%
rename from src/Umbraco.Core/Cache/FastDictionaryAppCache.cs
rename to src/Umbraco.Abstractions/Cache/FastDictionaryAppCache.cs
index b38f36a7d8..159f9cd7cb 100644
--- a/src/Umbraco.Core/Cache/FastDictionaryAppCache.cs
+++ b/src/Umbraco.Abstractions/Cache/FastDictionaryAppCache.cs
@@ -10,24 +10,33 @@ namespace Umbraco.Core.Cache
///
/// Implements a fast on top of a concurrent dictionary.
///
- internal class FastDictionaryAppCache : IAppCache
+ public class FastDictionaryAppCache : IAppCache
{
+ private readonly ITypeFinder _typeFinder;
+
+ public FastDictionaryAppCache(ITypeFinder typeFinder)
+ {
+ _typeFinder = typeFinder ?? throw new ArgumentNullException(nameof(typeFinder));
+ }
+
///
/// Gets the internal items dictionary, for tests only!
///
- internal readonly ConcurrentDictionary> Items = new ConcurrentDictionary>();
+ private readonly ConcurrentDictionary> _items = new ConcurrentDictionary>();
+
+ public int Count => _items.Count;
///
public object Get(string cacheKey)
{
- Items.TryGetValue(cacheKey, out var result); // else null
+ _items.TryGetValue(cacheKey, out var result); // else null
return result == null ? null : SafeLazy.GetSafeLazyValue(result); // return exceptions as null
}
///
public object Get(string cacheKey, Func