save indexed value in cache is not necessary

This commit is contained in:
2017-09-22 19:51:26 +02:00
parent d6bbbd87f5
commit e32820c913
3 changed files with 67 additions and 13 deletions

View File

@ -382,7 +382,7 @@ class Settings(object):
if opt is None:
ntime = int(time())
if self._p_.hascache(path, index):
is_cached, props = self._p_.getcache(path, ntime, index)
is_cached, props = self._p_.getcache(path, ntime, None)
else:
is_cached = False
if not is_cached or 'cache' not in props:
@ -396,7 +396,7 @@ class Settings(object):
ntime = ntime + expires_time
else:
ntime = None
self._p_.setcache(path, props, ntime, index)
self._p_.setcache(path, props, ntime, None)
else:
if path is None: # pragma: optional cover
raise ValueError(_('if opt is not None, path should not be'