pull/2311/head
kunfei 2 years ago
parent 9bb9adecd5
commit a5b77af9f9
  1. 7
      app/src/main/java/io/legado/app/help/source/BookSourceExtensions.kt

@ -7,9 +7,14 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import kotlinx.coroutines.withContext
import java.util.concurrent.ConcurrentHashMap
/**
* 采用md5作为key可以在分类修改后自动重新计算,不需要手动刷新
*/
private val mutexMap by lazy { hashMapOf<String, Mutex>() }
private val exploreKindsMap by lazy { hashMapOf<String, List<ExploreKind>>() }
private val exploreKindsMap by lazy { ConcurrentHashMap<String, List<ExploreKind>>() }
private val aCache by lazy { ACache.get("explore") }
private fun BookSource.exploreKindsKey(): String {

Loading…
Cancel
Save