Function

cache

A Compose compiler plugin API.

cache

Source set: Common
public inline fun <T> Composer.cache(invalid: Boolean, block: @DisallowComposableCalls () -> T): T

A Compose compiler plugin API. DO NOT call directly.

Cache, that is remember, a value in the composition data of a composition. This is used to implement remember and used by the compiler plugin to generate more efficient calls to remember when it determines these optimizations are safe.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: