memoryCacheMaxSizePercentWhileInBackground

fun <Error class: unknown class>.memoryCacheMaxSizePercentWhileInBackground(percent: Double): <Error class: unknown class>

Reduces the memory cache's MemoryCache.maxSize to a percent of MemoryCache.initialMaxSize while the app is in the background (i.e. while its process lifecycle state is not at least Lifecycle.State.STARTED).

This option helps proactively free up memory while the app's UI isn't visible. Lower values free up more memory. Setting this option to 1.0 (the default) will not reduce the memory cache's max size when the app is backgrounded. Setting this option to 0.0 will free all strong references to the images in the memory cache when the app is backgrounded.