Appsmith needs the following information to connect to a Redis instance.
Click to expand
After filling up the three fields as described above, click on the "Test" button to verify the configuration and click "Save".
Querying Redis
The Redis query pane can be used to run any of the commands supported by Redis. The response from this command is displayed in the result window. Please refer to the official documentation for the list of commands that are supported. A few examples are listed below.
Checking connection
The connection to a Redis instance can be verified using a simple PING command.
1
PING
Copied!
Inserting a key
A new key value pair can be inserted into the cache using the SET command as follows.
1
SET key_name new_value
Copied!
Retrieving a key
Stored key value pairs can be retrieved using the GET command.
1
GET key_name
Copied!
Using Queries in applications
Once you have successfully run a Query, you can use it in your application to