I'm guessing that no one answered you because it's Sunday (in the US). I didn't design the SessionDao functionality and I'm not super familiar with it, but I can make an educated guess. The point of SessionDao is to give the application control over session persistence. So, when calling SessionDao, we have two options - call it every single time that we want to know something, or cache information. If we cached, that would mean effectively removing control from the application. Instead, it makes more sense for a SessionDao to make its own decisions about caching - some (like in-memory) don't need caching at all. Others might need it, but the extent to which it is needed and how updates are handled may vary wildly by implementation. So, my advice would be to either use the CacheManager that shiro provides or something more specific to your use case and cache your database calls inside the SessionDao.
Hope that helps, Jared On Aug 11, 2013 8:50 PM, "xiemeilong" <[email protected]> wrote: > why nobody answer me? My English is not very good . Hoping you can > understand > my question. If you don't understand, leave a post please. > > > > -- > View this message in context: > http://shiro-user.582556.n2.nabble.com/why-using-DelegatingSession-tp7579023p7579024.html > Sent from the Shiro User mailing list archive at Nabble.com. >
