How can I set cacheManager properties, while using Apache shiro. On debugging , I am getting INFO like,
80104 [1045903843@qtp-967078155-3] INFO org.apache.shiro.realm.AuthorizingRealm - No cache or cacheManager properties have been set. Authorization cache cannot be obtained.
I am using JSF2 and Google Cloud SQL.
If using Shiro's INI config, you set the SecurityManager's cacheManager property like any other bean property. For example:
[main]
cacheManager = com.something.impl.SomeCacheManager
# config cacheManager as necessary, e.g.
# cacheManager.foo = bar
securityManager.cacheManager = $cacheManager
You can use the out-of-the-box EhCacheManager or implement the CacheManager
and Cache
interfaces yourself to use a custom cache backing store (e.g. Memcache, Coherence, GigaSpaces, any modern NoSQL Key/Value store, etc...)