Package org.richfaces.cache

Examples of org.richfaces.cache.CacheManager


     *
     * @see org.richfaces.jsr330.Initializable#init(org.richfaces.jsr330.Binders)
     */
    public void init() {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        cacheManager = new CacheManager();
        Map<?, ?> envMap = facesContext.getExternalContext().getInitParameterMap();
        instance = cacheManager.createCache(facesContext, ResourceHandlerImpl.RESOURCE_CACHE_NAME, envMap);
    }
View Full Code Here


    @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();
    }
View Full Code Here

TOP

Related Classes of org.richfaces.cache.CacheManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.