Fixes
This commit is contained in:
@@ -173,7 +173,7 @@ class Plugin(object):
|
||||
log.error("Something went wrong when finishing the plugin function. Could not find the 'is_running' key")
|
||||
|
||||
|
||||
def getCache(self, cache_key, url = None):
|
||||
def getCache(self, cache_key, url = None, timeout = 300):
|
||||
cache = Env.get('cache').get(cache_key)
|
||||
if cache:
|
||||
if not Env.setting('development'): log.debug('Getting cache %s' % cache_key)
|
||||
@@ -182,7 +182,7 @@ class Plugin(object):
|
||||
if url:
|
||||
try:
|
||||
data = self.urlopen(url)
|
||||
self.setCache(cache_key, data)
|
||||
self.setCache(cache_key, data, timeout = timeout)
|
||||
return data
|
||||
except:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user