how do they compare their advantages and disadvantages?
I feel that ConcurrentHashMap will have higher performance, after all, the built-in
how do they compare their advantages and disadvantages?
I feel that ConcurrentHashMap will have higher performance, after all, the built-in
is different. ConcurrentHashMap is essentially a data structure hash map, based on memory, while ehcache is a caching solution, such as caching data obsolescence, cache data expiration, data persistence, etc., and is more inclined to be a class library with more comprehensive functions. Depending on your application scenario, if it is just storage, of course, choose ConcurrentHashMap; cache and choose ehcache (of course, you can also implement your own cache framework based on the existing basic data structure)