I've configured a salted JDBC realm and a hazelcast cache. It seems to be
working just fine with one exception — newly defined roles in the DB are not
recognized by shiro. My guess is that this has something to do with the
subject/session/role being cached but not being updated when the DB changes.
I would like to make DB changes outside of the shiro app. What is the best
way to insure my cache is updated with changes made in the DB?

My steps are this:
1) Create a new session by logging in using a user's credentials.
2) Ask shiro if the user has a defined role. It answers that the user does
indeed have the role.
3) Add a new role for that user in the DB.
4) Ask shiro if the user has the new role. It answers that the user does not
have the role.

Restarting the shiro app will fix the problem.



--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/Stale-Roles-when-using-JDBC-realm-and-hazelcast-cache-tp7580759.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to