mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-19 21:44:30 -04:00
added TTL to cached objects
This commit is contained in:
@@ -5,19 +5,15 @@ namespace NzbDrone.Common.Cache
|
||||
{
|
||||
public interface ICached
|
||||
{
|
||||
bool ContainsKey(string key);
|
||||
void Clear();
|
||||
void Remove(string key);
|
||||
}
|
||||
|
||||
public interface ICached<T> : ICached
|
||||
{
|
||||
void Set(string key, T value);
|
||||
T Get(string key, Func<T> function);
|
||||
T Get(string key);
|
||||
void Set(string key, T value, TimeSpan? lifetime = null);
|
||||
T Get(string key, Func<T> function, TimeSpan? lifeTime = null);
|
||||
T Find(string key);
|
||||
|
||||
ICollection<T> Values { get; }
|
||||
ICollection<string> Keys { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user