org.jetbrains.kotlin.analysis.api.platform.caches¶
Types¶
NullableCaffeineCache¶
A wrapper around a Caffeine Cache which stores null values returned by the computation in the form of explicit objects. On a conceptual level, this allows the cache to store failures so that future accesses to the same key don't recompute the same failure.
NullableConcurrentCache¶
@JvmInline
value class NullableConcurrentCache<K : Any, V>(val map: ConcurrentMap<K, Any> = ConcurrentHashMap())
A wrapper around a ConcurrentMap which stores null values returned by the computation in the form of explicit objects.
NullValue¶
object NullValue
An object used as a representative for null in collections which prohibit null values.
Functions¶
getOrPut¶
getOrPutWithNullableValue¶
Implements Cache.getOrPut with NullValue conversion.
Implements ConcurrentMap.getOrPut with NullValue conversion.
nullValueToNull¶
inline fun <V> Any.nullValueToNull(): V
withStatsCounter¶
Applies the StatsCounter to the Caffeine cache builder if it's non-null, or otherwise doesn't register it.