mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
added TTL to cached objects
This commit is contained in:
parent
fa5dda8e2f
commit
121f3b973d
11 changed files with 160 additions and 141 deletions
|
@ -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; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue