storeOf

inline fun <T : @Serializable Any> storeOf(codec: Codec<T>, default: T? = null, enableCache: Boolean = true): KStore<T>

Creates a store with a given codec

Return

store that contains a value of type T

Parameters

default

returns this value if the file is not found. defaults to null

enableCache

maintain a cache. If set to false, it always reads from disk

codec

codec to be used.