我成功设置了 Azure Redis 服务器(按照此步骤 [ https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-dotnet-how-to-use-azure-redis-cache][1] )。我的问题是如何将我的 Delphi 应用程序连接到 Azure Redis 缓存?我正在使用 Delphi XE 构建 VCL 应用程序。
最佳答案
我使用了 redis AUTH 命令(参见 https://redis.io/commands/auth ),其值来自 Azure 上的访问 key 。
IdTCPClient1.Host := 'project.redis.cache.windows.net';
IdTCPClient1.Port := 6379;
IdTCPClient1.Connect;
IdTCPClient1.Socket.WriteLn('auth authentication=youraccesskey');
关于azure - Delphi 连接到 Azure Redis 缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54032871/