[jboss-jira] [JBoss JIRA] Commented: (JBPORTAL-1325) ConsumerCacheInterceptor : should not use the cache just after login

Julien Viet (JIRA) jira-events at lists.jboss.org
Wed Jul 4 20:08:51 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBPORTAL-1325?page=comments#action_12367753 ] 
            
Julien Viet commented on JBPORTAL-1325:
---------------------------------------

does it still happen in 2.6 ?

> ConsumerCacheInterceptor : should not use the cache just after login
> --------------------------------------------------------------------
>
>                 Key: JBPORTAL-1325
>                 URL: http://jira.jboss.com/jira/browse/JBPORTAL-1325
>             Project: JBoss Portal
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: Portal Core
>         Environment: jbp 2.4.0
>            Reporter: Antoine Herzog
>         Assigned To: Julien Viet
>             Fix For: 2.8 Final, 2.6.1 Final
>
>
> Use case : 
>  - user come to the site. 
>  - Portlet show views for unchecked user. These views are put in the cache.
>  - user log in, let's say as admin
>  - the cached views still show the previous things, not taking into account the change of authorizations
>  - the user can't see the proper things
> usual needs :
>  - for I18n portals : change of locale when user log in. all the portlets must do the change, not depending on cache
>  - for admin or special roles features in the  portlet views
>  - for modes depending on roles (see forum post)
> In the default portal, there are no use of cache. so all these use cases are fullfiled.
> to reproduce the problem : 
>  - put some cache on the user portlet (great feature for prod), the user portlet window may not update after logging.
> resolution :
> in the ConsumerCacheInterceptor
> the CacheKey do not take into account the login state.
> see : public CacheKey(StateString navigationalState, WindowState windowState, Mode mode)
> so store the user name (or "unchecked") in the CacheEntry.
> put the parameter "userOfFragment" in the CacheKey.
> when retrieving the CacheEntry, compare the currentUser and the userOfFragment, and don't use the cache if different.
> just to see : can we have access to the logued user in this interceptor ? (that, i don't know)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list