Example usage for org.apache.shiro.cache AbstractCacheManager AbstractCacheManager

List of usage examples for org.apache.shiro.cache AbstractCacheManager AbstractCacheManager

Introduction

In this page you can find the example usage for org.apache.shiro.cache AbstractCacheManager AbstractCacheManager.

Prototype

public AbstractCacheManager() 

Source Link

Document

Default no-arg constructor that instantiates an internal name-to-cache ConcurrentMap .

Usage

From source file:com.yea.shiro.session.mgt.redis.ShiroSessionDAO.java

License:Apache License

public ShiroSessionDAO() {
    super.setCacheManager(new AbstractCacheManager() {
        @Override/*from   w ww  .ja  v a 2 s.  com*/
        protected Cache<Serializable, Session> createCache(String name) throws CacheException {
            return new MapCache<Serializable, Session>(name, new ConcurrentHashMap<Serializable, Session>());
        }
    });

    this.setSessionIdGenerator(new ShiroSessionIdGenerator());
}