Search code examples
azuredelphiredispascalazure-redis-cache

Delphi Connect To Azure Cache for Redis


I successfully setup the Azure Redis Server (following this steps [https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-dotnet-how-to-use-azure-redis-cache][1] ). My problem is how can I connect my Delphi App to Azure Cache for Redis? Im using Delphi XE to build VCL Application.


Solution

  • I used the redis AUTH command (see https://redis.io/commands/auth) having the value from Access Keys on Azure.

     IdTCPClient1.Host := 'project.redis.cache.windows.net';
     IdTCPClient1.Port := 6379;
     IdTCPClient1.Connect;
     IdTCPClient1.Socket.WriteLn('auth authentication=youraccesskey');