mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
updates addon cache times
This commit is contained in:
@@ -4,10 +4,10 @@ const { toStreamInfo } = require('./lib/streamInfo');
|
||||
const { cacheWrapStream } = require('./lib/cache');
|
||||
const repository = require('./lib/repository');
|
||||
|
||||
const CACHE_MAX_AGE = process.env.CACHE_MAX_AGE || 24 * 60; // 24 hours in seconds
|
||||
const CACHE_MAX_AGE_EMPTY = 4 * 60; // 4 hours in seconds
|
||||
const STALE_REVALIDATE_AGE = 4 * 60; // 4 hours
|
||||
const STALE_ERROR_AGE = 7 * 24 * 60; // 7 days
|
||||
const CACHE_MAX_AGE = process.env.CACHE_MAX_AGE || 4 * 60 * 60; // 4 hours in seconds
|
||||
const CACHE_MAX_AGE_EMPTY = 30 * 60; // 30 minutes
|
||||
const STALE_REVALIDATE_AGE = 4 * 60 * 60; // 4 hours
|
||||
const STALE_ERROR_AGE = 7 * 24 * 60 * 60; // 7 days
|
||||
|
||||
const builder = new addonBuilder({
|
||||
id: 'com.stremio.torrentio.addon',
|
||||
|
||||
@@ -4,7 +4,7 @@ const mangodbStore = require('cache-manager-mongodb');
|
||||
const GLOBAL_KEY_PREFIX = 'torrentio-addon';
|
||||
const STREAM_KEY_PREFIX = `${GLOBAL_KEY_PREFIX}|stream`;
|
||||
|
||||
const STREAM_TTL = process.env.STREAM_TTL || 24 * 60 * 60; // 24 hours
|
||||
const STREAM_TTL = process.env.STREAM_TTL || 4 * 60 * 60; // 4 hours
|
||||
const STREAM_EMPTY_TTL = process.env.STREAM_EMPTY_TTL || 30 * 60; // 30 minutes
|
||||
// When the streams are empty we want to cache it for less time in case of timeouts or failures
|
||||
|
||||
|
||||
Reference in New Issue
Block a user