@PostConstruct
public void init() {
// create cache instance
facesContext = FacesContext.getCurrentInstance();
CacheManager cacheManager = new CacheManager();
Map<?, ?> initParameterMap = facesContext.getExternalContext().getInitParameterMap();
cache = cacheManager.createCache(facesContext, "test-cache", initParameterMap);
// insert value into cache and put it into cacheValue for later retrieval
cache.put("x", "value-x", null);
cacheValue = cache.get("x").toString();
}