Search in sources :

Example 1 with LCacheManager

use of org.nutz.plugins.cache.impl.lcache.LCacheManager in project nutzboot by nutzam.

the class ShiroEnvStarter method getShiroLcacheCacheManager.

@IocBean(name = "shiroLcacheCacheManager")
public CacheManager getShiroLcacheCacheManager(@Inject("refer:shiroEhcacheCacheManager") CacheManager shiroEhcacheCacheManager, @Inject("refer:shiroRedisCacheManager") CacheManager shiroRedisCacheManager) {
    LCacheManager cacheManager = new LCacheManager();
    cacheManager.setLevel1(shiroEhcacheCacheManager);
    cacheManager.setLevel2(shiroRedisCacheManager);
    cacheManager.setJedisAgent(ioc.get(JedisAgent.class));
    return cacheManager;
}
Also used : JedisAgent(org.nutz.integration.jedis.JedisAgent) LCacheManager(org.nutz.plugins.cache.impl.lcache.LCacheManager) IocBean(org.nutz.ioc.loader.annotation.IocBean)

Aggregations

JedisAgent (org.nutz.integration.jedis.JedisAgent)1 IocBean (org.nutz.ioc.loader.annotation.IocBean)1 LCacheManager (org.nutz.plugins.cache.impl.lcache.LCacheManager)1