mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 21:39:34 +02:00
TrackedCommands are cleaned up automatically
TrackedCommandCleanupCommand is not tracked
This commit is contained in:
@@ -61,6 +61,19 @@ namespace NzbDrone.Common.Cache
|
||||
return value.Object;
|
||||
}
|
||||
|
||||
public T Remove(string key)
|
||||
{
|
||||
CacheItem value;
|
||||
_store.TryRemove(key, out value);
|
||||
|
||||
if (value == null)
|
||||
{
|
||||
return default(T);
|
||||
}
|
||||
|
||||
return value.Object;
|
||||
}
|
||||
|
||||
public T Get(string key, Func<T> function, TimeSpan? lifeTime = null)
|
||||
{
|
||||
Ensure.That(() => key).IsNotNullOrWhiteSpace();
|
||||
@@ -81,7 +94,6 @@ namespace NzbDrone.Common.Cache
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
_store.Clear();
|
||||
|
Reference in New Issue
Block a user