jvz commented on a change in pull request #19:
URL:
https://github.com/apache/logging-log4j-kotlin/pull/19#discussion_r625951333
##########
File path:
log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/LoggingFactory.kt
##########
@@ -75,3 +81,5 @@ private fun <T : Any> unwrapCompanionClass(ofClass:
Class<T>): Class<*> {
ofClass
}
}
+
+private val loggerCache = ConcurrentHashMap<Class<*>, KotlinLogger>()
Review comment:
The easiest implementation of an LRU cache in Java would be using
https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html#removeEldestEntry-java.util.Map.Entry-
with `Collections.synchronizedMap()`. For a more sophisticated cache, copying
some code from commons-collections could be done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]