mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-10 06:27:26 +08:00
[F] Fix cache key
This commit is contained in:
@@ -43,7 +43,7 @@ abstract class MeowApi(val serialize: (String, Any?) -> String) {
|
|||||||
if (nextIndex == -1) return@api fn().let { mapOf("userId" to uid, "length" to it.size, key to it) + add }
|
if (nextIndex == -1) return@api fn().let { mapOf("userId" to uid, "length" to it.size, key to it) + add }
|
||||||
|
|
||||||
// Try to get cache
|
// Try to get cache
|
||||||
val cacheKey = "$this:$uid:$add"
|
val cacheKey = "$key:$uid:$add"
|
||||||
val list = pageCache.getOrPut(cacheKey) { fn().let {
|
val list = pageCache.getOrPut(cacheKey) { fn().let {
|
||||||
if (it.size > maxCount) millis() to it
|
if (it.size > maxCount) millis() to it
|
||||||
else return@api mapOf("userId" to uid, "length" to it.size, "nextIndex" to -1, key to it) + add
|
else return@api mapOf("userId" to uid, "length" to it.size, "nextIndex" to -1, key to it) + add
|
||||||
|
|||||||
Reference in New Issue
Block a user