Merge pull request #189 from InsanusMokrassar/0.12.9

fix of cache filling without clearing of values
This commit is contained in:
InsanusMokrassar 2022-09-07 22:16:50 +06:00 committed by GitHub
commit 7cca6039cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,9 @@ open class SimpleKVCache<K, V>(
kvParent.unset(it)
}
}
do {
val removed = cacheQueue.remove(k)
} while (removed)
cacheQueue.addLast(k)
kvParent.set(k, v)
}