def set(self, key, value):
self.open()
if not self.lock:
return time.time(), value
try:
return super(FileCache, self).set(key, value)
except dbm.error:
logger.exception("Failed to save to cache, flushing cache")
self.destroy()
self.open()
return super(FileCache, self).set(key, value)
except Exception:
logger.exception("Failed to save to cache.")
return time.time(), value
评论列表
文章目录