@@ -45,7 +45,7 @@ fun <K : Any?, V : Any?> Caffeine<in K, in V>.asCache(scope: CoroutineScope): Ca
4545 * If the suspendable computation throws or computes a null value then the
4646 * entry will be automatically removed.
4747 */
48- fun <K , V > Caffeine <Any , Any >.asLoadingCache (compute : suspend (K ) -> V ): LoadingCache <K , V > {
48+ fun <K : Any ? , V : Any ? > Caffeine <in K , in V >.asLoadingCache (compute : suspend (K ) -> V ): LoadingCache <K , V > {
4949 val scope = CoroutineScope (Dispatchers .IO + CoroutineName (" Aedile-AsyncLoadingCache-Scope" ) + SupervisorJob ())
5050 return asLoadingCache(scope, compute)
5151}
@@ -59,7 +59,7 @@ fun <K, V> Caffeine<Any, Any>.asLoadingCache(compute: suspend (K) -> V): Loading
5959 * If the suspendable computation throws or computes a null value then the
6060 * entry will be automatically removed.
6161 */
62- fun <K , V > Caffeine <Any , Any >.asLoadingCache (
62+ fun <K : Any ? , V : Any ? > Caffeine <in K , in V >.asLoadingCache (
6363 scope : CoroutineScope ,
6464 compute : suspend (K ) -> V
6565): LoadingCache <K , V > {
@@ -78,7 +78,7 @@ fun <K, V> Caffeine<Any, Any>.asLoadingCache(
7878 * The [reloadCompute] function is invoked to refresh an entry if refreshAfterWrite
7979 * is enabled or refresh is invoked. See full docs [AsyncCacheLoader.asyncReload].
8080 */
81- fun <K , V > Caffeine <Any , Any >.asLoadingCache (
81+ fun <K : Any ? , V : Any ? > Caffeine <in K , in V >.asLoadingCache (
8282 compute : suspend (K ) -> V ,
8383 reloadCompute : suspend (K , V ) -> V ,
8484): LoadingCache <K , V > {
@@ -100,7 +100,7 @@ fun <K, V> Caffeine<Any, Any>.asLoadingCache(
100100 *
101101 * The compute functions will execute on the given [scope].
102102 */
103- fun <K , V > Caffeine <Any , Any >.asLoadingCache (
103+ fun <K : Any ? , V : Any ? > Caffeine <in K , in V >.asLoadingCache (
104104 scope : CoroutineScope ,
105105 compute : suspend (K ) -> V ,
106106 reloadCompute : suspend (K , V ) -> V ,
@@ -125,7 +125,7 @@ fun <K, V> Caffeine<Any, Any>.asLoadingCache(
125125 * If the suspendable computation throws or computes a null value then the
126126 * entry will be automatically removed.
127127 */
128- fun <K , V > Caffeine <Any , Any >.asBulkLoadingCache (compute : suspend (Set <K >) -> Map <K , V >): LoadingCache <K , V > {
128+ fun <K : Any ? , V : Any ? > Caffeine <in K , in V >.asBulkLoadingCache (compute : suspend (Set <K >) -> Map <K , V >): LoadingCache <K , V > {
129129 val scope = CoroutineScope (Dispatchers .IO + CoroutineName (" Aedile-AsyncLoadingCache-Scope" ) + SupervisorJob ())
130130 return asBulkLoadingCache(scope, compute)
131131}
@@ -141,7 +141,7 @@ fun <K, V> Caffeine<Any, Any>.asBulkLoadingCache(compute: suspend (Set<K>) -> Ma
141141 *
142142 * The compute function will execute on the given [scope].
143143 */
144- fun <K , V > Caffeine <Any , Any >.asBulkLoadingCache (
144+ fun <K : Any ? , V : Any ? > Caffeine <in K , in V >.asBulkLoadingCache (
145145 scope : CoroutineScope ,
146146 compute : suspend (Set <K >) -> Map <K , V >
147147): LoadingCache <K , V > {
0 commit comments