From a38d7bef9c9f8ba7e3ee6a021085bd3cba62bc0a Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 4 Jun 2021 09:11:28 +0200 Subject: [PATCH] increase cache timeout to 5 hours --- backend/stream.py | 3 --- backend/stream_providers.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/stream.py b/backend/stream.py index c26a20b..276cc8b 100755 --- a/backend/stream.py +++ b/backend/stream.py @@ -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 diff --git a/backend/stream_providers.py b/backend/stream_providers.py index 081b9d2..8d6b6ff 100755 --- a/backend/stream_providers.py +++ b/backend/stream_providers.py @@ -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