|
|
@@ -1,4 +1,4 @@ |
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Threading; |
|
|
@@ -15,7 +15,7 @@ namespace DotNetCore.CAP.Dashboard |
|
|
|
/// </summary> |
|
|
|
// ReSharper disable once InheritdocConsiderUsage |
|
|
|
// ReSharper disable once InconsistentNaming |
|
|
|
internal class Cache<K, T> : IDisposable |
|
|
|
public class Cache<K, T> : IDisposable |
|
|
|
{ |
|
|
|
#region Constructor and class members |
|
|
|
|
|
|
@@ -121,7 +121,7 @@ namespace DotNetCore.CAP.Dashboard |
|
|
|
|
|
|
|
private void RemoveByTimer(object state) |
|
|
|
{ |
|
|
|
Remove((K) state); |
|
|
|
Remove((K)state); |
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
@@ -251,8 +251,8 @@ namespace DotNetCore.CAP.Dashboard |
|
|
|
try |
|
|
|
{ |
|
|
|
var removers = (from k in _cache.Keys.Cast<K>() |
|
|
|
where keyPattern(k) |
|
|
|
select k).ToList(); |
|
|
|
where keyPattern(k) |
|
|
|
select k).ToList(); |
|
|
|
|
|
|
|
foreach (var workKey in removers) |
|
|
|
{ |
|
|
@@ -354,7 +354,7 @@ namespace DotNetCore.CAP.Dashboard |
|
|
|
/// instance. |
|
|
|
/// The <c>.Global</c> member is lazy instanciated. |
|
|
|
/// </summary> |
|
|
|
internal class CapCache : Cache<string, object> |
|
|
|
public class CapCache : Cache<string, object> |
|
|
|
{ |
|
|
|
#region Static Global Cache instance |
|
|
|
|
|
|
@@ -372,4 +372,4 @@ namespace DotNetCore.CAP.Dashboard |
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
} |
|
|
|
} |