Install Redis clients
How to use Redis from your application
Using Redis from the command line interface is not enough as the goal is to use it from your application. To do so, you need to download and install a Redis client library for your programming language. You'll find a full list of clients for different languages in this page.
For instance if you happen to use the Ruby programming language our best advice is to use the Redis-rb client. You can install it using the command gem install redis.
These instructions are Ruby specific, but actually many library clients for popular languages look quite similar: you create a Redis object and execute commands calling methods. A short interactive example using Ruby:
>> require 'rubygems'
=> false
>> require 'redis'
=> true
>> r = Redis.new
=> #<Redis client v4.5.1 for redis://127.0.0.1:6379/0>
>> r.ping
=> "PONG"
>> r.set('foo','bar')
=> "OK"
>> r.get('foo')
=> "bar"
Feedback
If you've found issues on this page, or have suggestions for improvement, please submit a request to merge or open an issue in the repository.