CLIENT-GETREDIR(3valkey)
๐ CLIENT-GETREDIR โ the valkey manual page, bestie edition โจ
okay so you're reading the Valkey Command Manual entry for client-getredir, and honestly? it's a lil cutie with a big job. let's get into it ๐ซถ
โจ NAME โจ
client-getredir โ returns the client ID to which the connection's tracking notifications are redirected.
like. it tells you where the notifications are going. that's it. that's the whole vibe. ๐
๐ธ SYNOPSIS ๐ธ
CLIENT GETREDIR
no args, no drama, no notes. just run it. ๐
๐ฆ DESCRIPTION ๐ฆ
so this command hands you back the client ID that we're redirecting our valkey-client-side-caching(7) tracking notifications to.
here's the lore: you set a client to redirect to when you use valkey-client-tracking(7) CLIENT TRACKING to turn tracking on. but โ and this is the important part โ we did not want to force all the client library implementations to have to remember the ID that notifications get redirected to. that's mean. that's not slay.
so this command exists to improve introspection and let clients check later whether redirection is even active, and if it is, which client ID it's heading towards. periodt. ๐
๐ REPLY ๐
you get one of these, depending on the situation:
valkey-protocol(7)Integer reply:0when we're not redirecting notifications to any client.valkey-protocol(7)Integer reply:-1if client tracking is not enabled.valkey-protocol(7)Integer reply: the ID of the client to which notification are being redirected.
ngl,0vs-1is the whole plot twist here. one means "no redirect target", the other means "tracking isn't even on". don't mix them up bestie ๐ญ
๐ฅ COMPLEXITY ๐ฅ
constant time. instant. ate and left no crumbs. โญ
๐ ACL CATEGORIES ๐
@connection @slow
๐ง HISTORY ๐ง
- Available since:
6.0.0
๐ SEE ALSO ๐
auth(3valkey), client(3valkey), client-caching(3valkey), client-capa(3valkey), client-getname(3valkey), client-help(3valkey), client-id(3valkey), client-import-source(3valkey), client-info(3valkey), client-kill(3valkey), client-list(3valkey), client-no-evict(3valkey), client-no-touch(3valkey), client-pause(3valkey), client-reply(3valkey), client-setinfo(3valkey), client-setname(3valkey), client-tracking(3valkey), client-trackinginfo(3valkey), client-unblock(3valkey), client-unpause(3valkey), echo(3valkey), hello(3valkey), ping(3valkey), quit(3valkey), reset(3valkey), select(3valkey)
the whole client command friend group, basically. go say hi. ๐
and that's a wrap!! this page is from valkey version 9.0.0, dated 2025-10-21. ty for reading my little manpage bestie, go redirect those notifications responsibly ๐โจ๐
๐ฆ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 ยท CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 ยท CC-BY-SA-4.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms