Added the Digital Release Date back in.

Improved performance and system load when loading content #4082
This commit is contained in:
tidusjar 2021-07-07 11:59:27 +01:00
commit 0c4bd10b0f
25 changed files with 320 additions and 227 deletions

View file

@ -41,12 +41,12 @@ namespace Ombi.Settings.Settings
var model = obj;
return model;
}, DateTime.Now.AddHours(2));
}, DateTimeOffset.Now.AddHours(2));
}
public async Task<T> GetSettingsAsync()
{
return await _cache.GetOrAdd(CacheName, async () =>
return await _cache.GetOrAddAsync(CacheName, async () =>
{
var result = await Repo.GetAsync(EntityName);
if (result == null)
@ -61,7 +61,7 @@ namespace Ombi.Settings.Settings
var model = obj;
return model;
}, DateTime.Now.AddHours(5));
}, DateTimeOffset.Now.AddHours(5));
}
public bool SaveSettings(T model)