[
http://jira.jboss.com/jira/browse/JBPORTAL-1325?page=comments#action_1235... ]
Antoine Herzog commented on JBPORTAL-1325:
------------------------------------------
precision : default portal : some portlets have some cache, but when it is not critical.
UserPortlet have no cache.
Administration portlet has -1 cache, but you get it always after login.
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
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