Special display handler for RESP3 'invalidate' messages. * This function does not validate the reply, so it should * already be confirmed correct */
| 964 | * This function does not validate the reply, so it should |
| 965 | * already be confirmed correct */ |
| 966 | static sds cliFormatInvalidateTTY(redisReply *r) { |
| 967 | sds out = sdsnew("-> invalidate: "); |
| 968 | |
| 969 | for (size_t i = 0; i < r->element[1]->elements; i++) { |
| 970 | redisReply *key = r->element[1]->element[i]; |
| 971 | assert(key->type == REDIS_REPLY_STRING); |
| 972 | |
| 973 | out = sdscatfmt(out, "'%s'", key->str, key->len); |
| 974 | if (i < r->element[1]->elements - 1) |
| 975 | out = sdscatlen(out, ", ", 2); |
| 976 | } |
| 977 | |
| 978 | return sdscatlen(out, "\n", 1); |
| 979 | } |
| 980 | |
| 981 | static sds cliFormatReplyTTY(redisReply *r, char *prefix) { |
| 982 | sds out = sdsempty(); |
no test coverage detected