fix of cache filling without clearing of values

This commit is contained in:
InsanusMokrassar 2022-09-07 21:56:41 +06:00
parent 38499c3d4a
commit 118e3dba39

View File

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