From 2afe16f6f74068eb8ab9430ddb117b0a1fdef980 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sat, 25 Nov 2017 18:34:47 +0200 Subject: A dummy cache to disable caching when needed --- default.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/default.py b/default.py index 73aab17..5ea7394 100644 --- a/default.py +++ b/default.py @@ -26,7 +26,19 @@ KAN_URL = 'http://www.kan.org.il' USER_AGENT = 'Kodi/plugin.video.kan/1.0' # I'm optimistic PLUGIN_NAME = "plugin.video.kan" # FIXME: a better way to get this? +class DummyCache: + def __init__(self): + pass + + def get(self, cache_id, checksum=''): + return None + + def set(self, cache_id, data, checksum='', expiration=None): + pass + + SiteCache = simplecache.SimpleCache() # FIXME: avoid this global +#SiteCache = DummyCache() # Avoid caching for now def trace(msg): xbmc.log(msg="Tzafrir: " + msg, level=xbmc.LOGNOTICE) -- cgit v1.2.3