I'm having an issue with the query cache not caching a query coming from a call to IAuthorizationService.IsAllowed(IUser user, string operation) exposed by Rhino Security.
I have the following in my config: <property name="cache.use_second_level_cache">true</property> <property name="cache.use_query_cache">true</property> <property name="cache.provider_class">NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache</property> Looking at the source code of Rhino Security, it ultimately calls a query where the "SetCacheable(true)" is set so I would suspect the results would be cached if I had things set up correctly. Using NHProf, I'm detecting a "Cached query: <Generated SQL HERE>" when a query is hit twice within the same session. However, I am expecting successive calls to the same query to be hitting the cache once I use a new session and this appears to not be the case. I'm using the IsAuthorized method to build a menu with only the operations a user is granted to appear. Since a menu (currently) could have 4-6 options, I was hoping to cache the results of the results of IsAuthorized so as a user navigates through the menu, I don't have to hit the expensive secured query each time. If anyone has had any experience with this type of issue and were able to get it resolved, I would appreciate any insight. Thanks. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
