Skip to content

Commit

Permalink
Image cache will be cleared in every 7 days
Browse files Browse the repository at this point in the history
Closes #850
  • Loading branch information
Iamlooker committed Dec 25, 2024
1 parent fdaf8d2 commit ef13dc9
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import java.io.File
import java.util.UUID
import kotlin.concurrent.thread
import kotlin.time.Duration
import kotlin.time.Duration.Companion.days
import kotlin.time.Duration.Companion.hours

object Cache {
Expand Down Expand Up @@ -112,10 +113,10 @@ object Cache {
thread {
cleanup(
context,
Pair(IMAGES_DIR, Duration.INFINITE),
Pair(IMAGES_DIR, 7.days),
Pair(INDEX_DIR, Duration.INFINITE),
Pair(PARTIAL_DIR, 24.hours),
Pair(RELEASE_DIR, 24.hours),
Pair(PARTIAL_DIR, 1.days),
Pair(RELEASE_DIR, 1.days),
Pair(TEMP_DIR, 1.hours),
)
}
Expand Down

0 comments on commit ef13dc9

Please sign in to comment.