core: Add torznab cache option for individual indexers (#12235)

This commit is contained in:
mikeoscar2006
2021-08-30 08:39:48 +05:30
committed by GitHub
parent 0b4195f3cb
commit 88959ac824
5 changed files with 22 additions and 4 deletions

View File

@@ -390,9 +390,12 @@ namespace Jackett.Common.Indexers
if (!CanHandleQuery(query) || !CanHandleCategories(query, isMetaIndexer))
return new IndexerResult(this, new ReleaseInfo[0], false);
var cachedReleases = cacheService.Search(this, query);
if (cachedReleases != null)
return new IndexerResult(this, cachedReleases, true);
if (query.Cache)
{
var cachedReleases = cacheService.Search(this, query);
if (cachedReleases != null)
return new IndexerResult(this, cachedReleases, true);
}
try
{