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

cn.ocoop.shiro.session.mgt.ShiroCacheManager Maven / Gradle / Ivy

There is a newer version: 1.0.3
Show newest version
package cn.ocoop.shiro.session.mgt;

import cn.ocoop.shiro.session.iface.ShiroCacheManagerAware;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;
import org.apache.shiro.util.Destroyable;

/**
 * Created by liolay on 15-7-27.
 */
public class ShiroCacheManager implements CacheManager, Destroyable {
    private ShiroCacheManagerAware shiroCacheManagerAware;

    public ShiroCacheManagerAware getShiroCacheManagerAware() {
        return shiroCacheManagerAware;
    }

    public void setShiroCacheManagerAware(ShiroCacheManagerAware shiroCacheManagerAware) {
        this.shiroCacheManagerAware = shiroCacheManagerAware;
    }

    @Override
    public  Cache getCache(String name) throws CacheException {
        return shiroCacheManagerAware.getCache(name);
    }

    @Override
    public void destroy() throws Exception {
        shiroCacheManagerAware.destroy();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy