Added support for multiple databases on the evictKeysWithExpiredTTL function

This commit is contained in:
Kelvin Mwinuka
2024-06-20 20:58:49 +08:00
parent 33d7eb2f6e
commit 663c097be8
6 changed files with 121 additions and 107 deletions

View File

@@ -40,7 +40,7 @@ func Test_CacheLRU(t *testing.T) {
ticker.Stop()
for i := len(access) - 1; i >= 0; i-- {
key := heap.Pop(&cache).(string)
key := heap.Pop(cache).(string)
if key != access[i] {
t.Errorf("expected key at index %d to be %s, got %s", i, access[i], key)
}