mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/23731 - Use the disk cache for the Contile top sites
This commit is contained in:
parent
2c70f80838
commit
6b8569b3cb
@ -340,7 +340,13 @@ class Core(
|
|||||||
}
|
}
|
||||||
val pocketStoriesService by lazyMonitored { PocketStoriesService(context, pocketStoriesConfig) }
|
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 topSitesStorage by lazyMonitored {
|
||||||
val defaultTopSites = mutableListOf<Pair<String, String>>()
|
val defaultTopSites = mutableListOf<Pair<String, String>>()
|
||||||
@ -459,10 +465,9 @@ class Core(
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val KEY_STRENGTH = 256
|
|
||||||
private const val KEY_STORAGE_NAME = "core_prefs"
|
private const val KEY_STORAGE_NAME = "core_prefs"
|
||||||
private const val PASSWORDS_KEY = "passwords"
|
|
||||||
private const val RECENTLY_CLOSED_MAX = 10
|
private const val RECENTLY_CLOSED_MAX = 10
|
||||||
const val HISTORY_METADATA_MAX_AGE_IN_MS = 14 * 24 * 60 * 60 * 1000 // 14 days
|
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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
object AndroidComponents {
|
object AndroidComponents {
|
||||||
const val VERSION = "99.0.20220214225657"
|
const val VERSION = "99.0.20220214232836"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user