package com.yd.rmi.cache;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;

public class SystemCacheManager {
	public static final CacheManager manager = CacheManager.create();
	
	public SystemCacheManager() {
	}

	public static Cache getCache(String cacheName) {
		if (!manager.cacheExists(cacheName)) {
			manager.addCache(cacheName);
		}
		return manager.getCache(cacheName);
	}
}
