Below is a summary of the issues encountered during today’s performance testing.
1. Problem
When testing a certain interface, it was found that keyspace_misses in Redis kept increasing, meaning the number of cache misses kept growing.
2. Analysis and Resolution Process
1) Using the dbsize command, the number of keys returned was greater than the number counted by keys *, indicating the existence of expired keys.

2) Executed flushall to clear all data.
3) Regenerated a fresh batch of new data.
4) Using the dbsize command, the number of keys returned was equal to the number counted by keys *|wc 鈥搇.
5) Monitored the cache miss count during testing; this value no longer changed, achieving a 100% hit rate.
3. Summary
When expired keys exist, the hit rate will not be 100%. First, use the dbsize command to check the number of keys, then use keys * to count the keys. If the numbers are not equal, it indicates the presence of