mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-07 21:51:13 -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
|
@ -374,6 +374,13 @@ namespace PlexRequests.UI.Modules
|
|||
var settings = this.Bind<SonarrSettings>();
|
||||
var profiles = SonarrApi.GetProfiles(settings.ApiKey, settings.FullUri);
|
||||
|
||||
// set the cache
|
||||
if (profiles != null)
|
||||
{
|
||||
var cache = new MemoryCacheProvider();
|
||||
cache.Set(CacheKeys.SonarrQualityProfiles, profiles);
|
||||
}
|
||||
|
||||
return Response.AsJson(profiles);
|
||||
}
|
||||
|
||||
|
@ -582,6 +589,13 @@ namespace PlexRequests.UI.Modules
|
|||
var settings = this.Bind<CouchPotatoSettings>();
|
||||
var profiles = CpApi.GetProfiles(settings.FullUri, settings.ApiKey);
|
||||
|
||||
// set the cache
|
||||
if (profiles != null)
|
||||
{
|
||||
var cache = new MemoryCacheProvider();
|
||||
cache.Set(CacheKeys.CouchPotatoQualityProfiles, profiles);
|
||||
}
|
||||
|
||||
return Response.AsJson(profiles);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue