diff --git a/jetcache-core/src/main/java/com/alicp/jetcache/AbstractCache.java b/jetcache-core/src/main/java/com/alicp/jetcache/AbstractCache.java index 2cbd6de38..74beb8aba 100644 --- a/jetcache-core/src/main/java/com/alicp/jetcache/AbstractCache.java +++ b/jetcache-core/src/main/java/com/alicp/jetcache/AbstractCache.java @@ -27,7 +27,7 @@ public abstract class AbstractCache implements Cache { private static Logger logger = LoggerFactory.getLogger(AbstractCache.class); - private ConcurrentHashMap loaderMap; + private volatile ConcurrentHashMap loaderMap; ConcurrentHashMap initOrGetLoaderMap() { if (loaderMap == null) {