From 407ce79e2c99ab05ebedbf4e1d650c5d9d7acbc6 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Tue, 4 Dec 2018 19:13:16 -0600 Subject: [PATCH] Don't cache file: URLs. Option --save-cache can mask changes to _filelist files while debugging. --- fanficfare/configurable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fanficfare/configurable.py b/fanficfare/configurable.py index 1c66fbb4..cd37d66c 100644 --- a/fanficfare/configurable.py +++ b/fanficfare/configurable.py @@ -1032,7 +1032,7 @@ class Configuration(configparser.SafeConfigParser): if self.getConfig('force_https'): ## For developer testing only. url = url.replace("http:","https:") cachekey=self._get_cachekey(url, parameters, headers) - if usecache and self._has_cachekey(cachekey): + if usecache and self._has_cachekey(cachekey) and not cachekey.startswith('file:'): logger.debug("#####################################\npagecache(POST) HIT: %s"%safe_url(cachekey)) data,redirecturl = self._get_from_pagecache(cachekey) return data @@ -1086,7 +1086,7 @@ class Configuration(configparser.SafeConfigParser): if self.getConfig('force_https'): ## For developer testing only. url = url.replace("http:","https:") cachekey=self._get_cachekey(url, parameters) - if usecache and self._has_cachekey(cachekey): + if usecache and self._has_cachekey(cachekey) and not cachekey.startswith('file:'): logger.debug("#####################################\npagecache(GET) HIT: %s"%safe_url(cachekey)) data,redirecturl = self._get_from_pagecache(cachekey) class FakeOpened: