@Trivial
    public static String normalizeCacheName(String cacheName, CacheConfig cacheConfig) {

        String tempCacheName = cacheName;

        if (cacheName.equalsIgnoreCase(DCacheBase.DEFAULT_BASE_JNDI_NAME)) {
            tempCacheName = DCacheBase.DEFAULT_CACHE_NAME;

        } else if (cacheName.equalsIgnoreCase(DCacheBase.DEFAULT_DMAP_JNDI_NAME)) {
            tempCacheName = DCacheBase.DEFAULT_DISTRIBUTED_MAP_NAME;
        }

        // Make sure the input cacheName matched with cacheConfig's cacheName.
        // If not match, set to the input cacheName for cacheConfig
        if (null != cacheConfig && !tempCacheName.equals(cacheConfig.cacheName)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "normalized cacheName=" + cacheName + " does not match with cacheConfig cacheName=" + cacheConfig.cacheName);
            }
            cacheConfig.cacheName = tempCacheName;
        }

        return tempCacheName;
    }
@ Trivial public static String normalizeCacheName ( String cacheName , CacheConfig cacheConfig ) { String tempCacheName = cacheName ; if ( cacheName . equalsIgnoreCase ( DCacheBase . DEFAULT_BASE_JNDI_NAME ) ) { tempCacheName = DCacheBase . DEFAULT_CACHE_NAME ; } else if ( cacheName . equalsIgnoreCase ( DCacheBase . DEFAULT_DMAP_JNDI_NAME ) ) { tempCacheName = DCacheBase . DEFAULT_DISTRIBUTED_MAP_NAME ; } if ( null != cacheConfig && ! tempCacheName . equals ( cacheConfig . cacheName ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "normalized cacheName=" + cacheName + " does not match with cacheConfig cacheName=" + cacheConfig . cacheName ) ; } cacheConfig . cacheName = tempCacheName ; } return tempCacheName ; }
Since the cache instances are stored with key as cacheName, it has to change default cache JNDI name to internal
cache name.