DEV Community

Discussion on: Please Redis Responsibly

Collapse
 
anaguib profile image
Ahmed Naguib

Of course I am not familiar with the whole problem as you are. But, I am wondering if using aliases was enough in this case without the need of storing index names in Redis.

alias_user_1    |    alias_user_2   |   alias_user_3, alias_user_4
Index A         | Index B           | Index C
user_1          | user_2            | user_3,user_4

Then if you need a specific document you just request it using the alias and not the index name.

Collapse
 
gkorland profile image
Guy Korland

Did you consider just using RediSearch?

Collapse
 
molly profile image
Molly Struve (she/her)

We actually store the alias names in Redis. The index names are never referenced anywhere in our application. We could have stored them in MySQL on each client but we choose Redis because it was fast and if we ever needed to update one it was as simple as just busting the cache.