public static CacheConfiguration build(ConfigMap<String, String> cacheConfigMap) {

		if (cacheConfigMap == null || cacheConfigMap.size() == 0) {
			return new SynchronizedCacheConfiguration();
		}
		if ("ENABLE".equals(cacheConfigMap.getString("cache", "ENABLE").toUpperCase())) {
			
			String cacheAdapter = cacheConfigMap.getString("cache.adapter", "SYN").toUpperCase();
			
			if (cacheAdapter.equals("SYN")) {
				return new SynchronizedCacheConfiguration(cacheConfigMap);
			} else if (cacheAdapter.equals("EHCACHE")) {
				return new EhCacheConfiguration(cacheConfigMap);
			} else if (cacheAdapter.equals("MEMCACHED")) {
				return new MemcachedCacheConfiguration(cacheConfigMap);
			}
		}
		return null;
	}
public static CacheConfiguration build ( ConfigMap < String , String > cacheConfigMap ) { if ( cacheConfigMap == null || cacheConfigMap . size ( ) == 0 ) { return new SynchronizedCacheConfiguration ( ) ; } if ( "ENABLE" . equals ( cacheConfigMap . getString ( "cache" , "ENABLE" ) . toUpperCase ( ) ) ) { String cacheAdapter = cacheConfigMap . getString ( "cache.adapter" , "SYN" ) . toUpperCase ( ) ; if ( cacheAdapter . equals ( "SYN" ) ) { return new SynchronizedCacheConfiguration ( cacheConfigMap ) ; } else if ( cacheAdapter . equals ( "EHCACHE" ) ) { return new EhCacheConfiguration ( cacheConfigMap ) ; } else if ( cacheAdapter . equals ( "MEMCACHED" ) ) { return new MemcachedCacheConfiguration ( cacheConfigMap ) ; } } return null ; }
根据K-V配置信息生成缓存配置

@param cacheConfigMap 缓存的K-V配置信息

@return 缓存配置