mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 18:47:15 -07:00
#114 start caching quality profiles. Set the cache on startup and when obtaining quality profiles in settings
This commit is contained in:
parent
08b14d0164
commit
e8c222f66e
6 changed files with 81 additions and 14 deletions
|
@ -83,7 +83,7 @@ namespace PlexRequests.Helpers
|
|||
/// <param name="key">The key.</param>
|
||||
/// <param name="data">The object we want to store.</param>
|
||||
/// <param name="cacheTime">The amount of time we want to cache the object.</param>
|
||||
public void Set(string key, object data, int cacheTime)
|
||||
public void Set(string key, object data, int cacheTime = 20)
|
||||
{
|
||||
var policy = new CacheItemPolicy { AbsoluteExpiration = DateTime.Now + TimeSpan.FromMinutes(cacheTime) };
|
||||
Cache.Add(new CacheItem(key, data), policy);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue