If we use a static hash map for the caching process in a regular class (not in one class), will it work in a cluster environment?
The static field value is stored in the JVM memory, and each JVM will have its own static map. This may be OK if you do not need a unique cache for all cluster members.
It looks like you are writing infrastructure requirements like Terracotta: http://terracotta.org/documentation/product-documentation-1page
You are talking about JVM memory sharing