84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
比如在一个db里,有一堆键为topic:xxxxxx和user:xxxxxx的值,而如果我只想让所有的user:xxxxxx失效,有什么办法吗?
topic:xxxxxx
user:xxxxxx
这是一个很常见的应用场景,比如user:xxxxxx对应的表结构改变了,需要重新缓存,而我不希望影响其他的数据。
我想到的是用KEYS user:*命令来遍历所有符合条件的数据。但是这个命令太耗资源了,有什么其它办法吗?
KEYS user:*
光阴似箭催人老,日月如移越少年。
user的所有键的IDshould be put into a list for management, so that it is easy to read
user
ID
Shouldn’t this kind of data be stored in a hash type?
user
的所有键的ID
should be put into a list for management, so that it is easy to readShouldn’t this kind of data be stored in a hash type?