We are using hibernate in docker with small heap memory. after dump the memory from JVM, we found there are 600+ instances in the memory, and cost 38M memory. the default cache size is 2048, the memory may grow to 150M+. We want limit it, but after i search the codes, the QueryPlanCache use just use BoundedConcurrentHashMap to cache it.