memoryCache

fun memoryCache(mapToMemoryValue: (ImageResult) -> Bitmap? = { (it as? ImageResult.OfBitmap)?.bitmap }, mapToImageResult: (Bitmap) -> ImageResult? = { ImageResult.OfBitmap(it) }, block: () -> MemoryCache<MemoryKey, Bitmap>)