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-release Show documentation
Show all versions of godot-library-release Show documentation
Contains godot api as kotlin classes and jvm cpp interaction code.
The newest version!
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
}
}