All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jpattern.gwt.client.cache.CacheService Maven / Gradle / Ivy

package com.jpattern.gwt.client.cache;

import java.util.HashMap;
import java.util.Map;

/**
 * 
 * @author Francesco Cina
 *
 * 26/lug/2011
 */
public class CacheService implements ICacheService {

	private Map cacheMap = new HashMap();
	
	@Override
	public ICache getCache(String cacheName) {
		if (cacheMap.containsKey(cacheName)) {
			return cacheMap.get(cacheName);
		}
		return new NullCache();
	}

	@Override
	public void registerCache(String cacheName, ICache cache) {
		cacheMap.put(cacheName, cache);		
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy