02-21-2024, 02:15 AM
I think it's better to overwrite the old cache?
If it don't update when it's fully filled then this cache become totally static cache!!
I think here is some way to measure how to overwrite the old cache.
1. Based on the hit rate. The cache with higher hit rate won't get overwrite.
The overwrite starts with cache with lowest hit rate.
I think this way is the best. Because it save the "active" cache and abandon the "inactive" old cache.
2. Based on last access time. This way is not too clever but faster.
If it don't update when it's fully filled then this cache become totally static cache!!
I think here is some way to measure how to overwrite the old cache.
1. Based on the hit rate. The cache with higher hit rate won't get overwrite.
The overwrite starts with cache with lowest hit rate.
I think this way is the best. Because it save the "active" cache and abandon the "inactive" old cache.
2. Based on last access time. This way is not too clever but faster.