All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.getunleash.cache.InMemoryToggleCache.kt Maven / Gradle / Ivy

package io.getunleash.cache

import io.getunleash.data.Toggle
import java.util.concurrent.ConcurrentHashMap

class InMemoryToggleCache : ToggleCache {
    private val internalCache = ConcurrentHashMap>()

    override fun read(key: String): Map {
        return internalCache[key] ?: emptyMap()
    }

    override fun write(key: String, value: Map) {
        internalCache[key] = value
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy