Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
[FIX] make disk cache release version sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
kudanai committed Oct 12, 2020
1 parent 32a2dcf commit 62e35ab
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package io.dotlottie.loader.defaults
import android.content.Context
import androidx.collection.LruCache
import com.jakewharton.disklrucache.DiskLruCache
import io.dotlottie.loader.BuildConfig
import io.dotlottie.loader.DotLottieCache
import io.dotlottie.loader.DotLottieCacheStrategy
import io.dotlottie.loader.md5
Expand All @@ -28,7 +29,9 @@ internal object DefaultDotLottieCache: DotLottieCache{
dir.mkdirs()

diskCache = DiskLruCache.open(
dir, 1, 1,
dir,
BuildConfig.VERSION_CODE,
1,
1024 * 1024 * 20 //20mb
)
} catch (e: Exception) {
Expand Down

0 comments on commit 62e35ab

Please sign in to comment.