|
|
@ -5,6 +5,7 @@ import io.legado.app.data.entities.Cache |
|
|
|
|
|
|
|
|
|
|
|
object CacheManager { |
|
|
|
object CacheManager { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@JvmOverloads |
|
|
|
fun put(key: String, value: Any, saveTime: Int = 0) { |
|
|
|
fun put(key: String, value: Any, saveTime: Int = 0) { |
|
|
|
val deadline = if (saveTime == 0) 0 else System.currentTimeMillis() + saveTime * 1000 |
|
|
|
val deadline = if (saveTime == 0) 0 else System.currentTimeMillis() + saveTime * 1000 |
|
|
|
val cache = Cache(key, value.toString(), deadline) |
|
|
|
val cache = Cache(key, value.toString(), deadline) |
|
|
|