dave08
07/14/2019, 3:53 PM@Nullable
V get(@NonNull K key, @NonNull Function<? super K, ? extends V> mappingFunction);
My current implementation doesn't seem to be right (the IDE is still using the original function and not mine...):
inline fun <reified K, V> Cache<in K, V>.get(key: K, crossinline mapping: suspend (K) -> V?): V? =
get(key) { runBlocking(<http://Dispatchers.IO|Dispatchers.IO>) { mapping(key) } }
What could be wrong?