package com.keyboard.journey.ad

import com.applovin.mediation.ads.MaxInterstitialAd

class InstAdCacheManager {
    private val mMaxAdCacheDict: MutableMap<String, MaxInterstitialAd> = mutableMapOf()

    companion object {
        val instance: InstAdCacheManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
            InstAdCacheManager()
        }
    }

    fun setAdCache(place: String, adCache: MaxInterstitialAd) {
        mMaxAdCacheDict[place] = adCache
    }

    fun getAdCache(place: String): MaxInterstitialAd? {
        return mMaxAdCacheDict[place]
    }
}