# KeyCache

Artifact: [androidx.constraintlayout:constraintlayout-core](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/core/motion/utils/KeyCache.java+class:androidx.constraintlayout.core.motion.utils.KeyCache) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

*** ** * ** ***


```
class KeyCache
```

<br />

*** ** * ** ***

Used by KeyTimeCycles (and any future time dependent behaviour) to cache its current parameters to maintain consistency across requestLayout type rebuilds.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCache#KeyCache()()` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCache#getFloatValue(java.lang.Object,java.lang.String,int)(view: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!, type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, element: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/KeyCache#setFloatValue(java.lang.Object,java.lang.String,int,float)(view: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!, type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, element: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |

## Public constructors

### KeyCache

Added in 1.1.2

```
KeyCache()
```

## Public functions

### getFloatValue

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun getFloatValue(view: Any!, type: String!, element: Int): Float
```

### setFloatValue

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun setFloatValue(view: Any!, type: String!, element: Int, value: Float): Unit
```