If i am writing a multiplatform lib targeting andr...
# javascript
r
If i am writing a multiplatform lib targeting android, ios and js, what is a good solution for multiplatform caching for example the LoadingCache pattern Lets say i have a
Copy code
suspend fun refreshToken(token: Token)
if the cache is cold, I want to prevent to coroutines concurrently refreshing the value I have tried some solutions Semaphore (the coroutine aware one) Actor-like impl with channels but without actor lib. Are there any other simpler/more obvious solutions?
a
Yes, I use it in my jvm+js mpp
r
quality issues? any other issues?
a
It's enough for my cases