我正在尝试在 Redis 中运行 HSCAN 命令以仅匹配通过 C# 所需的哈希字段
这就是代码的样子
var options = new ConfigurationOptions
{
EndPoints = { "endpoint" },
Proxy = Proxy.Twemproxy
};
twemproxy_new = ConnectionMultiplexer.Connect(options);
db = twemproxy_new.GetDatabase();
Dictionary<string,string> inputDict = new Dictionary<string, string>();
// populate inputDict with "n" fields & values
var cachekey = "my_hash";
db.GetDatabase().HashSet(cachekey, inputDict, CommandFlags.FireAndForget);
db.HashScan(cacheKey, "*9*");
// this is where it fails with the exception
// Command is not available on your server: HSCAN
但是当我在 twemproxy 服务器上运行 HSCAN 命令时,它似乎按预期工作
我错过了什么?
谢谢