mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Application and Release Cache Improvements
This commit is contained in:
@@ -117,7 +117,9 @@ namespace NzbDrone.Core.Applications.Lidarr
|
|||||||
|
|
||||||
private LidarrIndexer BuildLidarrIndexer(IndexerDefinition indexer, DownloadProtocol protocol, int id = 0)
|
private LidarrIndexer BuildLidarrIndexer(IndexerDefinition indexer, DownloadProtocol protocol, int id = 0)
|
||||||
{
|
{
|
||||||
var schemas = _schemaCache.Get(Definition.Settings.ToJson(), () => _lidarrV1Proxy.GetIndexerSchema(Settings), TimeSpan.FromDays(7));
|
var cacheKey = $"{Settings.BaseUrl}";
|
||||||
|
var schemas = _schemaCache.Get(cacheKey, () => _lidarrV1Proxy.GetIndexerSchema(Settings), TimeSpan.FromDays(7));
|
||||||
|
|
||||||
var newznab = schemas.Where(i => i.Implementation == "Newznab").First();
|
var newznab = schemas.Where(i => i.Implementation == "Newznab").First();
|
||||||
var torznab = schemas.Where(i => i.Implementation == "Torznab").First();
|
var torznab = schemas.Where(i => i.Implementation == "Torznab").First();
|
||||||
|
|
||||||
|
@@ -117,7 +117,9 @@ namespace NzbDrone.Core.Applications.Radarr
|
|||||||
|
|
||||||
private RadarrIndexer BuildRadarrIndexer(IndexerDefinition indexer, DownloadProtocol protocol, int id = 0)
|
private RadarrIndexer BuildRadarrIndexer(IndexerDefinition indexer, DownloadProtocol protocol, int id = 0)
|
||||||
{
|
{
|
||||||
var schemas = _schemaCache.Get(Definition.Settings.ToJson(), () => _radarrV3Proxy.GetIndexerSchema(Settings), TimeSpan.FromDays(7));
|
var cacheKey = $"{Settings.BaseUrl}";
|
||||||
|
var schemas = _schemaCache.Get(cacheKey, () => _radarrV3Proxy.GetIndexerSchema(Settings), TimeSpan.FromDays(7));
|
||||||
|
|
||||||
var newznab = schemas.Where(i => i.Implementation == "Newznab").First();
|
var newznab = schemas.Where(i => i.Implementation == "Newznab").First();
|
||||||
var torznab = schemas.Where(i => i.Implementation == "Torznab").First();
|
var torznab = schemas.Where(i => i.Implementation == "Torznab").First();
|
||||||
|
|
||||||
|
@@ -117,7 +117,9 @@ namespace NzbDrone.Core.Applications.Readarr
|
|||||||
|
|
||||||
private ReadarrIndexer BuildReadarrIndexer(IndexerDefinition indexer, DownloadProtocol protocol, int id = 0)
|
private ReadarrIndexer BuildReadarrIndexer(IndexerDefinition indexer, DownloadProtocol protocol, int id = 0)
|
||||||
{
|
{
|
||||||
var schemas = _schemaCache.Get(Definition.Settings.ToJson(), () => _readarrV1Proxy.GetIndexerSchema(Settings), TimeSpan.FromDays(7));
|
var cacheKey = $"{Settings.BaseUrl}";
|
||||||
|
var schemas = _schemaCache.Get(cacheKey, () => _readarrV1Proxy.GetIndexerSchema(Settings), TimeSpan.FromDays(7));
|
||||||
|
|
||||||
var newznab = schemas.Where(i => i.Implementation == "Newznab").First();
|
var newznab = schemas.Where(i => i.Implementation == "Newznab").First();
|
||||||
var torznab = schemas.Where(i => i.Implementation == "Torznab").First();
|
var torznab = schemas.Where(i => i.Implementation == "Torznab").First();
|
||||||
|
|
||||||
|
@@ -117,7 +117,9 @@ namespace NzbDrone.Core.Applications.Sonarr
|
|||||||
|
|
||||||
private SonarrIndexer BuildSonarrIndexer(IndexerDefinition indexer, DownloadProtocol protocol, int id = 0)
|
private SonarrIndexer BuildSonarrIndexer(IndexerDefinition indexer, DownloadProtocol protocol, int id = 0)
|
||||||
{
|
{
|
||||||
var schemas = _schemaCache.Get(Definition.Settings.ToJson(), () => _sonarrV3Proxy.GetIndexerSchema(Settings), TimeSpan.FromDays(7));
|
var cacheKey = $"{Settings.BaseUrl}";
|
||||||
|
var schemas = _schemaCache.Get(cacheKey, () => _sonarrV3Proxy.GetIndexerSchema(Settings), TimeSpan.FromDays(7));
|
||||||
|
|
||||||
var newznab = schemas.Where(i => i.Implementation == "Newznab").First();
|
var newznab = schemas.Where(i => i.Implementation == "Newznab").First();
|
||||||
var torznab = schemas.Where(i => i.Implementation == "Torznab").First();
|
var torznab = schemas.Where(i => i.Implementation == "Torznab").First();
|
||||||
|
|
||||||
|
@@ -126,6 +126,8 @@ namespace Prowlarr.Api.V1.Search
|
|||||||
result.Add(release);
|
result.Add(release);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_remoteReleaseCache.ClearExpired();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user