Fixes for data corruption/exception in cache usage

Specifically as it relates to serializers and job event writing at
high speeds
This commit is contained in:
Matthew Jones
2017-01-23 14:39:03 -05:00
parent 483fbb6f24
commit abdd91bd1f
4 changed files with 17 additions and 6 deletions

View File

@@ -162,7 +162,10 @@ class SettingsWrapper(UserSettingsHolder):
def _get_local(self, name):
self._preload_cache()
cache_key = Setting.get_cache_key(name)
cache_value = cache.get(cache_key, empty)
try:
cache_value = cache.get(cache_key, empty)
except ValueError:
cache_value = empty
logger.debug('cache get(%r, %r) -> %r', cache_key, empty, cache_value)
if cache_value == SETTING_CACHE_NOTSET:
value = empty