useCached

fun <T> ComponentScope.useCached(vararg inputs: Any?, calculator: () -> T): T

Create a CachedValue variable within a Component. The calculator will provide the calculated value if it hasn't already been calculated or if the inputs have changed since the previous calculation.