mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-03-11 17:15:37 +00:00
fine tune mongo connection config
This commit is contained in:
parent
a2c126e072
commit
87939e490b
1 changed files with 6 additions and 1 deletions
|
|
@ -18,7 +18,12 @@ const MESSAGE_VIDEO_URL_TTL = 60 * 1000; // 1 minutes
|
|||
const MONGO_URI = process.env.MONGODB_URI;
|
||||
|
||||
const memoryCache = new KeyvCacheableMemory({ ttl: MESSAGE_VIDEO_URL_TTL, lruSize: Infinity });
|
||||
const remoteCache = MONGO_URI && new KeyvMongo(MONGO_URI, { collection: 'torrentio_addon_collection' });
|
||||
const remoteCache = MONGO_URI && new KeyvMongo(MONGO_URI, {
|
||||
collection: 'torrentio_addon_collection',
|
||||
minPoolSize: 50,
|
||||
maxPoolSize: 200,
|
||||
maxConnecting: 5,
|
||||
});
|
||||
|
||||
async function cacheWrap(cache, key, method, ttl) {
|
||||
if (!cache) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue