cache.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:jenkins-epo 作者: peopledoc 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号