change to in memory cache

This commit is contained in:
Tobias Pankner 2022-08-12 19:01:29 +02:00
parent e3701389df
commit 001eab0225
2 changed files with 2 additions and 2 deletions

View file

@ -13,7 +13,7 @@ MINIMUM_COUNT_LANGUAGE = 5
DEFAULT_STATION_LIMIT = 200
SHOW_BROKEN_STATIONS = False
ID_PREFIX = "RB"
session = requests_cache.CachedSession('ycast_cache')
session = requests_cache.CachedSession('ycast_cache', backend='memory')
def get_json_attr(json, attr):

View file

@ -30,7 +30,7 @@ app = Flask(__name__)
def revalidate_cache():
logging.info("Starting cache revalidation")
session = requests_cache.CachedSession('ycast_cache')
session = requests_cache.CachedSession('ycast_cache', backend='memory')
get_urls = [
response.url for response in session.cache.responses.values()
if response.request.method == 'GET'