increase cache timeout to 5 hours

This commit is contained in:
Roy Olav Purser 2021-06-04 09:11:28 +02:00
parent 8832958112
commit a38d7bef9c
Signed by: roypur
GPG Key ID: E14D26A036F21656
2 changed files with 1 additions and 4 deletions

View File

@ -3,7 +3,6 @@ import json
import sys
import urllib.parse
import os
import time
import base64
import logging
import asyncio
@ -12,7 +11,6 @@ import tornado.routing
import aiohttp
import aiohttp_socks
import stream_providers
import expiringdict
logging.basicConfig(format='[%(filename)s:%(lineno)d] %(message)s', stream=sys.stdout, level=logging.INFO)
logger = logging.getLogger(__name__)
@ -32,7 +30,6 @@ icecast_server = os.environ.get("ICECAST_SERVER")
stream_server = os.environ.get("STREAM_SERVER")
proxy_server = os.environ.get("PROXY_SERVER")
ctype_cache = expiringdict.ExpiringDict(max_len=128, max_age_seconds=1800)
class ProxyElem():
def __init__(self, proxy):
self.proxy = proxy

View File

@ -234,7 +234,7 @@ class NextcloudRunner(MetaProvider):
stream_data["thumbnail"] = None
return StreamData(**stream_data)
upstream_cache = expiringdict.ExpiringDict(max_len=512, max_age_seconds=1800)
upstream_cache = expiringdict.ExpiringDict(max_len=512, max_age_seconds=18000)
async def get_from_runner(cache_key, runner, logger):
result = None