| The usual approach to composite Redis keys is namespacing by using a structured key and some separators. A possible key could look like: IndexedNews:author:title The syntax is: TableName COLON KeyPart1 COLON KeyPart2 [ COLON KeyPartN ... ] Key parts are separated by a colon (:) and colons inside the key parts can be escaped (\:). By reversing the process, we can parse the key into its components. Assume we have a key author=the:author and title=mytitle so the resulting key would be represented as: IndexedNews:the\:author:mytitle Let's take that example to the next level with a composite key of author=theauthor (hint: trailing backslash) and title=mytitle IndexedNews:theauthor\:mytitle A trailing backslash introduces ambiguity about escaping. It's no longer possible to tell the key parts apart. Gunnar Morling Guillaume Smet any thoughts from your side? |