gc := gcache2.New(10).ARC().Build()
for i := 0; i <= 10; i++ {
value := fmt.Sprintf("val%d", i)
gc.Set(i, value)
}
Upon inspection of the cache internal state, it appears that:
- As expected, all the key/values are stored in the tier 1 cache
t1
- The key
0 with value val0 is correctly evicted from t1
However, the ghost list b1 does not keep track of the evicted key 0.
See: ARC: A Self-Tuning, Low Overhead Replacement Cache - https://www.usenix.org/legacy/events/fast03/tech/full_papers/megiddo/megiddo.pdf
Upon inspection of the cache internal state, it appears that:
t10with valueval0is correctly evicted fromt1However, the ghost list
b1does not keep track of the evicted key0.See: ARC: A Self-Tuning, Low Overhead Replacement Cache - https://www.usenix.org/legacy/events/fast03/tech/full_papers/megiddo/megiddo.pdf