code: public Cache createCache(String name, CacheConfiguration config, int type) throws CacheException {
  		if (config == null) {
  			throw new CacheException("Cache configuration is null");
  		}
  		
  		Cache cache = null;
  
  		switch (type) {
  		case Cache.SYN_CACHE:
  			cache = new SynchronizedCache(name, (SynchronizedCacheConfiguration) config);
  			break;
  		case Cache.EHCACHE_CACHE:
  			cache = new EhCache(name, (EhCacheConfiguration) config);
  			break;
  		case Cache.MEMCACHED_CACHE:
  			cache = new MemcachedCache(name, (MemcachedCacheConfiguration)config);
  			break;
  		}
  
  		if (name != null && cache != null) {
  			this.cachePool.put(name, cache);
  		}
  		return cache;
  	}
docs: 生成缓存
  
  @param name 缓存名称
  @param config 缓存配置
  @param type 缓存类别
  
  @return 生成的缓存对象
  
  @throws CacheException 缓存异常