How do I do this in a Guice ShiroModule:

cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
securityManager.cacheManager = $cacheManager
I have tried this and I am still getting no cache.
bindConstant().annotatedWith(Names.named("shiro.cacheManager")).to("org.apache.shiro.cache.MemoryConstrainedCacheManager");
 
bindConstant().annotatedWith(Names.named("shiro.securityManager.cacheManager")).to(“$cacheManager”);

9:40:47.987 [RMI TCP Connection(3)-127.0.0.1] DEBUG 
o.a.shiro.realm.AuthorizingRealm - No authorizationCache instance set.  
Checking for a cacheManager...
19:40:47.987 [RMI TCP Connection(3)-127.0.0.1] INFO  
o.a.shiro.realm.AuthorizingRealm - No cache or cacheManager properties have 
been set.  Authorization cache cannot be obtained.

Thanks,
Warren



Reply via email to