Kotlin, Kotlin Design Patterns, Kotlin Flyweight, Kotlin Flyweight Pattern.
there is a problem of synchronization However, there is 1 catch: you make 2 requests for an image with the same URL, which is not what we want. It happens because, before the first fetchImage(url) ends, another Coroutines tries to get the URL from cache , but since it’s not yet present, it invokes