提交 566fe6ae authored 作者: Frederic Bastien's avatar Frederic Bastien

Make cache forward compatible in case we remove the md5 from the cmodule keys

上级 568cb449
...@@ -447,6 +447,10 @@ def get_safe_part(key): ...@@ -447,6 +447,10 @@ def get_safe_part(key):
# Find the md5 hash part. # Find the md5 hash part.
c_link_key = key[1] c_link_key = key[1]
# In case in the future, we don't have an md5 part and we have
# such stuff in the cache. In that case, we can set None, and the
# rest of the cache mechanism will just skip that key.
md5 = None
for key_element in c_link_key[1:]: for key_element in c_link_key[1:]:
if (isinstance(key_element, string_types) and if (isinstance(key_element, string_types) and
key_element.startswith('md5:')): key_element.startswith('md5:')):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论