File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/main/kotlin/com/adamratzman/spotify/http Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import com.adamratzman.spotify.models.serialization.toObject
15
15
import java.net.HttpURLConnection
16
16
import java.net.URLEncoder
17
17
import java.util.Base64
18
+ import java.util.concurrent.ConcurrentHashMap
19
+ import java.util.concurrent.ConcurrentMap
18
20
import java.util.function.Supplier
19
21
import kotlin.math.ceil
20
22
@@ -147,7 +149,7 @@ internal class EndpointBuilder(private val path: String) {
147
149
}
148
150
149
151
class SpotifyCache {
150
- val cachedRequests = mutableMapOf <SpotifyRequest , CacheState >()
152
+ val cachedRequests: ConcurrentMap <SpotifyRequest , CacheState > = ConcurrentHashMap ()
151
153
152
154
internal operator fun get (request : SpotifyRequest ): CacheState ? {
153
155
checkCache(request)
You can’t perform that action at this time.
0 commit comments