godot.util.Cache.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of godot-library-debug Show documentation
Show all versions of godot-library-debug Show documentation
Contains godot api as kotlin classes and jvm cpp interaction code.
package godot.util
// A basic LRU cache.
internal class LRUCache(private val capacity: Int) : LinkedHashMap(capacity, 0.75f, true) {
override fun removeEldestEntry(eldest: MutableMap.MutableEntry?): Boolean {
return size > capacity
}
}