add SlaveError for slave's length
This commit is contained in:
@ -250,7 +250,7 @@ class Setting(object):
|
||||
if opt_or_descr in self._cache:
|
||||
t = time()
|
||||
props, raise_text, created = self._cache[opt_or_descr]
|
||||
if t - created < expires_time:
|
||||
if t < created:
|
||||
properties = props
|
||||
is_cached = True
|
||||
if not is_cached:
|
||||
@ -318,7 +318,7 @@ class Setting(object):
|
||||
|
||||
def _set_cache(self, opt, props, raise_text):
|
||||
if self.has_property('expire'):
|
||||
self._cache[opt] = (props, raise_text, time())
|
||||
self._cache[opt] = (props, raise_text, time() + expires_time)
|
||||
|
||||
def reset_cache(self):
|
||||
self._cache = {}
|
||||
|
Reference in New Issue
Block a user