Skip to content

Redis

  • Action
  • Databases

Gets, sets or deletes keys on a Redis server (or Valkey, Garnet, Memurai), or publishes a message on a channel. Get reads a key's text and continues on Missing when there's no such key; Set writes text to a key, optionally expiring after a while; Delete deletes keys; Publish sends a message to every program subscribed to the channel (a Redis Message trigger too). Continues on Failed with the reason in Error.

The Redis step in the MacroWin editor
Ctrl+Alt+B reads the website's last build status from Redis and shows it, or says there was no build yet.

Settings

SettingStarts asWhat it does
Operation Get Get only reads; Set and Delete change the server; Publish sends a message.
  • Get: Reads a key's text.
  • Set: Writes text to a key.
  • Delete: Deletes keys.
  • Publish: Publishes a message on a channel.
Server * ${} localhost The Redis server's name or IP address, such as localhost or 192.168.1.10 (Redis, Valkey, Garnet, Memurai...).
Key * ${} empty For example, visits or user:42:name.
Keys * ${} empty One key per line, such as session:42.
Value ${} empty The text to write. ${variables} are filled in.
Expires after (ms) 0 The key is removed after this long. 0: it stays.
When to write Always
  • Always
  • Only if the key doesn't exist: Keeps a value that's already there, such as for a lock or a first visit.
  • Only if the key exists: Never makes a new key.
Channel * ${} empty For example, orders or alerts:pc.
Message ${} empty The text sent. ${variables} are filled in.
Database 0 The database number, 0 to 15 on a usual server. Most use 0.
Port 6379 Usually 6379.
User name ${} empty Leave it empty for the default user (a password alone) or a server without sign-in.
Password ${} empty The server's or the user's password. Stored as a password.
TLS Off
  • Off: Not encrypted: for a server on this PC or your own network.
  • On: Encrypted; the server's certificate must be one Windows trusts. Hosted servers usually use it.
  • On, accept the server's own certificate: Encrypted, and any certificate is accepted, such as a self-signed one on a home server. Someone who can intercept the connection could pose as the server.
Time limit (ms) 10000 For connecting and the command. 0 waits as long as it takes.

Settings marked ${} take variables. * is required.

Where it continues

  • Out when it's done.
  • Missing when there's no such key.
  • Failed when the server can't be reached, refuses the sign-in or the command, or doesn't answer in time; the reason is in Error.

Outputs

Redis outputs
ValueThe key's text; empty when it's missing.
WrittenOff when When to write kept it from being written.
DeletedHow many of the keys were there (and are now gone).
ReceiversHow many subscribers got it.
ErrorWhy it failed; empty when it worked.

More in Databases: Run SQL, MongoDB

Build macros with Redis in MacroWin. Free to download, no account needed. Windows 10 and 11.

Download