Skip to content

Commit

Permalink
chore: add duration on cache for UpdateEpisodeJob.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziedelth committed Sep 4, 2024
1 parent 45873cc commit ca05efb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/fr/shikkanime/jobs/UpdateEpisodeJob.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import fr.shikkanime.utils.StringUtils
import fr.shikkanime.wrappers.AnimationDigitalNetworkWrapper
import fr.shikkanime.wrappers.CrunchyrollWrapper
import kotlinx.coroutines.runBlocking
import java.time.Duration
import java.time.ZonedDateTime

class UpdateEpisodeJob : AbstractJob {
Expand All @@ -49,7 +50,7 @@ class UpdateEpisodeJob : AbstractJob {
@Inject
private lateinit var traceActionService: TraceActionService

private val adnCache = MapCache<CountryCodeIdKeyCache, List<Episode>> {
private val adnCache = MapCache<CountryCodeIdKeyCache, List<Episode>>(duration = Duration.ofDays(1)) {
return@MapCache runBlocking {
val video = try {
AnimationDigitalNetworkWrapper.getShowVideo(it.id)
Expand Down

0 comments on commit ca05efb

Please sign in to comment.