提交 53e4a277 编写于 作者: G George Claghorn

Convert keys to binary in the Redis cache store

Fix encoding errors when using the pure-Ruby Redis driver instead of Hiredis. Dodge incompatibilities between UTF-8 and arbitrary value encodings, which rear their heads when the Redis driver tries to build a single command string from incompatibly-encoded keys and values.
上级 f21a6688
...@@ -363,7 +363,7 @@ def write_multi_entries(entries, expires_in: nil, **options) ...@@ -363,7 +363,7 @@ def write_multi_entries(entries, expires_in: nil, **options)
# Truncate keys that exceed 1kB. # Truncate keys that exceed 1kB.
def normalize_key(key, options) def normalize_key(key, options)
truncate_key super truncate_key super.b
end end
def truncate_key(key) def truncate_key(key)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册