Skip to content

Commit 30b26ca

Browse files
author
jaguzman
committed
Removed the CacheProviderManager
1 parent 98f6eaf commit 30b26ca

File tree

2 files changed

+9
-55
lines changed

2 files changed

+9
-55
lines changed

src/DotNetToolkit.Repository/Configuration/Caching/CacheProviderManager.cs

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/DotNetToolkit.Repository/Extensions/CachingProviderExtensions.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@
2323
/// </summary>
2424
public static class CachingProviderExtensions
2525
{
26+
private static string CachePrefix = "RepositoriesCachingPrefix";
27+
private static string CacheCounterPrefix = "RepositoriesCachingCounterPrefix";
28+
private static string CachePrefixGlue = "§";
29+
2630
private static readonly object _syncRoot = new object();
2731
private static string Name<T>() => typeof(T).FullName;
28-
private static string Glue => CacheProviderManager.CachePrefixGlue;
2932

3033
/// <summary>
3134
/// Gets or sets a cached query result that matches the specified key.
@@ -484,9 +487,9 @@ private static int GetCachingPrefixCounter<T>([NotNull] this ICacheProvider cach
484487
private static string FormatCachePrefixCounterKey<T>()
485488
{
486489
return string.Format("{1}{0}{2}",
487-
Glue,
490+
CachePrefixGlue,
488491
Name<T>(),
489-
CacheProviderManager.CacheCounterPrefix);
492+
CacheCounterPrefix);
490493
}
491494

492495
private static string FormatHashedKey<T>([NotNull] this ICacheProvider cacheProvider, [NotNull] string key)
@@ -496,12 +499,11 @@ private static string FormatHashedKey<T>([NotNull] this ICacheProvider cacheProv
496499

497500
var cacheKeyTransformer = cacheProvider.KeyTransformer ?? new DefaultCacheKeyTransformer();
498501

499-
return string.Format("{1}{0}{2}{0}{3}{0}{4}",
500-
Glue,
501-
CacheProviderManager.GlobalCachingPrefixCounter,
502+
return string.Format("{1}{0}{2}{0}{3}",
503+
CachePrefixGlue,
502504
cacheProvider.GetCachingPrefixCounter<T>(),
503505
cacheKeyTransformer.Transform(key),
504-
CacheProviderManager.CachePrefix);
506+
CachePrefix);
505507
}
506508

507509
private static string FormatQueryOptions<T>([CanBeNull] IQueryOptions<T> options)

0 commit comments

Comments
 (0)