1、在项目中使用后,发现jfinal-ext shiro插件中cache配置无用
即,不管是否配置
<cache name="myRealm.authorizationCache" maxElementsInMemory="10000"
overflowToDisk="true" eternal="true" timeToLiveSeconds="0"
timeToIdleSeconds="0" diskPersistent="true"
diskExpiryThreadIntervalSeconds="600">
</cache>
<cache name="shiro-activeSessionCache" maxElementsInMemory="10000"
overflowToDisk="true" eternal="true" timeToLiveSeconds="0"
timeToIdleSeconds="0" diskPersistent="true"
diskExpiryThreadIntervalSeconds="600" />
shiro-activeSessionCache
名称有用,可是这个确实shiro默认的名称。
2、如果在shiro.ini文件中配置了
userRealm.cachingEnabled=true
userRealm.authenticationCachingEnabled=true
userRealm.authenticationCacheName=authenticationCache
userRealm.authorizationCachingEnabled=true
userRealm.authorizationCacheName=authorizationCache
securityManager.realms=$userRealm
userRealm.cachingEnabled=true