mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
In simple words, when you make a request in Jackett, the results are saved in memory (cache). The next request will return results form the cache improving response time and making fewer requests to the sites. * We assume all indexers/sites are stateless, the same request return the same response. If you change the search term, categories or something in the query Jackett has to make a live request to the indexer. * There are some situations when we don't want to use the cache: ** When we are testing the indexers => if query.IsTest results are not cached ** When the user updates the configuration of one indexer => We call CleanIndexerCache to remove cached results before testing the configuration ** When there is some error/exception in the indexer => The results are not cached so we can retry in the next request * We want to limit the memory usage, so we try to remove elements from cache ASAP: ** Each indexer can have a maximum number of results in memory. If the limit is exceeded we remove old results ** Cached results expire after some time * Users can configure the cache or even disable it
This commit is contained in:
@@ -98,6 +98,14 @@ function loadJackettSettings() {
|
||||
$("#jackett-allowupdate").attr('checked', data.updatedisabled);
|
||||
$("#jackett-prerelease").attr('checked', data.prerelease);
|
||||
$("#jackett-logging").attr('checked', data.logging);
|
||||
|
||||
$("#jackett-cache-enabled").attr('checked', data.cache_enabled);
|
||||
$("#jackett-cache-ttl").val(data.cache_ttl);
|
||||
$("#jackett-cache-max-results-per-indexer").val(data.cache_max_results_per_indexer);
|
||||
if (!data.cache_enabled) {
|
||||
$("#jackett-show-releases").attr("disabled", true);
|
||||
}
|
||||
|
||||
$("#jackett-omdbkey").val(data.omdbkey);
|
||||
$("#jackett-omdburl").val(data.omdburl);
|
||||
var password = data.password;
|
||||
@@ -1126,6 +1134,9 @@ function bindUIButtons() {
|
||||
var jackett_update = $("#jackett-allowupdate").is(':checked');
|
||||
var jackett_prerelease = $("#jackett-prerelease").is(':checked');
|
||||
var jackett_logging = $("#jackett-logging").is(':checked');
|
||||
var jackett_cache_enabled = $("#jackett-cache-enabled").is(':checked');
|
||||
var jackett_cache_ttl = $("#jackett-cache-ttl").val();
|
||||
var jackett_cache_max_results_per_indexer = $("#jackett-cache-max-results-per-indexer").val();
|
||||
var jackett_omdb_key = $("#jackett-omdbkey").val();
|
||||
var jackett_omdb_url = $("#jackett-omdburl").val();
|
||||
|
||||
@@ -1143,6 +1154,10 @@ function bindUIButtons() {
|
||||
blackholedir: $("#jackett-savedir").val(),
|
||||
logging: jackett_logging,
|
||||
basepathoverride: jackett_basepathoverride,
|
||||
logging: jackett_logging,
|
||||
cache_enabled: jackett_cache_enabled,
|
||||
cache_ttl: jackett_cache_ttl,
|
||||
cache_max_results_per_indexer: jackett_cache_max_results_per_indexer,
|
||||
omdbkey: jackett_omdb_key,
|
||||
omdburl: jackett_omdb_url,
|
||||
proxy_type: jackett_proxy_type,
|
||||
|
Reference in New Issue
Block a user