For #23731 - Use the disk cache for the Contile top sites

upstream-sync
Gabriel Luong 2 years ago committed by mergify[bot]
parent 42282987f8
commit 869f4c89ee

@ -340,7 +340,13 @@ class Core(
}
val pocketStoriesService by lazyMonitored { PocketStoriesService(context, pocketStoriesConfig) }
val contileTopSitesProvider by lazyMonitored { ContileTopSitesProvider(client) }
val contileTopSitesProvider by lazyMonitored {
ContileTopSitesProvider(
context = context,
client = client,
maxCacheAgeInMinutes = CONTILE_MAX_CACHE_AGE
)
}
val topSitesStorage by lazyMonitored {
val defaultTopSites = mutableListOf<Pair<String, String>>()
@ -459,10 +465,9 @@ class Core(
}
companion object {
private const val KEY_STRENGTH = 256
private const val KEY_STORAGE_NAME = "core_prefs"
private const val PASSWORDS_KEY = "passwords"
private const val RECENTLY_CLOSED_MAX = 10
const val HISTORY_METADATA_MAX_AGE_IN_MS = 14 * 24 * 60 * 60 * 1000 // 14 days
private const val CONTILE_MAX_CACHE_AGE = 60L // 60 minutes
}
}

@ -3,5 +3,5 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
object AndroidComponents {
const val VERSION = "99.0.20220214225657"
const val VERSION = "99.0.20220214232836"
}

Loading…
Cancel
Save