[android-components](../../index.md) / [mozilla.components.support.base.utils](../index.md) / [SharedPreferencesCache](index.md) / [setToCache](./set-to-cache.md)

# setToCache

`fun setToCache(obj: `[`T`](index.md#T)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/base/src/main/java/mozilla/components/support/base/utils/SharedPreferencesCache.kt#L45)

### Parameters

`A` - [T](index.md#T) value to cache.