mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2024-11-17 21:43:46 +00:00
17 lines
412 B
Kotlin
17 lines
412 B
Kotlin
package dev.inmo.plaguposter.common
|
|
|
|
import org.koin.core.Koin
|
|
import org.koin.core.module.Module
|
|
import org.koin.core.qualifier.named
|
|
import org.koin.core.scope.Scope
|
|
|
|
val Scope.useCache: Boolean
|
|
get() = getOrNull(named("useCache")) ?: false
|
|
|
|
val Koin.useCache: Boolean
|
|
get() = getOrNull(named("useCache")) ?: false
|
|
|
|
fun Module.useCache(useCache: Boolean) {
|
|
single(named("useCache")) { useCache }
|
|
}
|