提交 b588d93e 编写于 作者: M Megvii Engine Team

fix(mge): fix fast-run cache mismatch

GitOrigin-RevId: a41150f71ab46ec343209c4ac93bc8165aefa26c
上级 90ca8554
......@@ -15,6 +15,7 @@ import shelve
from .logconf import get_logger
from .mgb import _PersistentCache
from .version import __version__
class _FakeRedisConn:
......@@ -85,7 +86,10 @@ class PersistentCacheOnServer(_PersistentCache):
return conn
def _make_key(self, category, key):
return b"@".join((self._prefix.encode("ascii"), category.encode("ascii"), key))
prefix_with_version = "{}:MGB{}".format(self._prefix, __version__)
return b"@".join(
(prefix_with_version.encode("ascii"), category.encode("ascii"), key)
)
def put(self, category, key, value):
conn = self._conn
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册