From 95e9a704a9feef853dfb31eaa1482e33e8844ca9 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sat, 25 Nov 2017 17:33:07 +0200 Subject: remove caching of downloaded HTML pages Simplecache seems to be horribly slow, and is a point of contention for multithreaded downloaders (in future commit). Leave it only for the kodi page data: this really saves work. --- default.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/default.py b/default.py index db61881..c83c652 100644 --- a/default.py +++ b/default.py @@ -80,18 +80,11 @@ class Page: def read_url(url): - cache_id = PLUGIN_NAME + '.url.' + url - cached_read = SiteCache.get(cache_id) - if cached_read: - return cached_read - headers = {'user-agent': USER_AGENT} response = requests.get(url, headers=headers) if response.status_code != 200: raise IOError("Invalid URL {}".format(url)) - SiteCache.set(cache_id, response.content, - expiration=datetime.timedelta(days=1)) return response.text -- cgit v1.2.3