mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 13:01:28 +02:00
Added Auth, startup options to UI
Added caching to ConfigFileProvider,
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Common.EnsureThat;
|
||||
|
||||
namespace NzbDrone.Common.Cache
|
||||
@@ -16,7 +17,12 @@ namespace NzbDrone.Common.Cache
|
||||
public void Set(string key, T value)
|
||||
{
|
||||
Ensure.That(() => key).IsNotNullOrWhiteSpace();
|
||||
_store.TryAdd(key, value);
|
||||
_store[key] = value;
|
||||
}
|
||||
|
||||
public T Get(string key)
|
||||
{
|
||||
return Get(key, () => { throw new KeyNotFoundException(key); });
|
||||
}
|
||||
|
||||
public T Get(string key, Func<T> function)
|
||||
|
Reference in New Issue
Block a user