if ( !settings.isQueryCacheEnabled() ) {
return null;
}
synchronized (allCacheRegions) {
QueryCache currentQueryCache = (QueryCache) queryCaches.get(cacheRegion);
if (currentQueryCache==null) {
currentQueryCache = settings.getQueryCacheFactory()
.getQueryCache(cacheRegion, updateTimestampsCache, settings, properties);
queryCaches.put(cacheRegion, currentQueryCache);
allCacheRegions.put( currentQueryCache.getRegionName(), currentQueryCache.getCache() );
}
return currentQueryCache;
}
}